Universal (isomorphic) JavaScript support for Angular 2.
* NodeJS :: Universal Starter repo
* ASP.NET Core :: Universal Starter repo
Manage your application lifecycle and serialize changes while on the server to be sent to the client.
Angular 2 Universal Patterns - ng-conf, May 2016
Angular Universal Source Code - ReadTheSource, January 2016
Full Stack Angular 2 - AngularConnect, Oct 2015
Angular 2 Server Rendering - Angular U, July 2015
Control server-rendered page and transfer state before client-side web app loads to the client-side-app.
When building Universal components in Angular 2 there are a few things to keep in mind.
Note: Universal currently only works with
router-deprecated
nativeElement directly. Use the Renderer. We do this to ensure that in any environment we're able to change our view.constructor(element: ElementRef, renderer: Renderer) {
renderer.setElementStyle(element.nativeElement, 'font-size', 'x-large');
}
navigator or document. Anything outside of Angular will not be detected when serializing your application into html. If you need access to these types please consider using DOM from "angular2/src/platform/dom/dom_adapter"url in img tag. For our native <img src=""> element the src attribute is reflected as the src property of the element type HTMLImageElement. We believe that using the word "universal" is correct when referring to a JavaScript Application that runs in more environments than the browser. (inspired by Universal JavaScript)
The Storage abstract class of the Web Storage API provides access to local storage for a particular domain.
An abstract service that can be used to get and set the title of a current HTML document.
Response EventEmitter which emits a single Response value on load event of
XMLHttpRequest.
Warn the developer about direct access to Window props
The property being accessed
An array of providers that should be passed into application() when bootstrapping a component.
See HTTP_PROVIDERS instead.
Provides a basic set of injectables to use the Http service in any application.
The HTTP_PROVIDERS should be included either in a component's injector,
or in the root injector when bootstrapping an application.
``` import {Component} from 'angular2/core'; import {bootstrap} from 'angular2/platform/browser'; import {NgFor} from 'angular2/common'; import {HTTP_PROVIDERS, Http} from 'angular2/http';
Provides a basic set of providers to use the Jsonp service in any application.
The JSONP_PROVIDERS should be included either in a component's injector,
or in the root injector when bootstrapping an application.
``` import {Component} from 'angular2/core'; import {NgFor} from 'angular2/common'; import {JSONP_PROVIDERS, Jsonp} from 'angular2/http';
See JSONP_PROVIDERS instead.
An array of providers that should be passed into application() when bootstrapping a component.
Bootstrapping for Angular applications.
You instantiate an Angular application by explicitly specifying a component to use
as the root component for your application via the bootstrap() method.
Assuming this index.html:
<html>
<!-- load Angular script tags here. -->
<body>
<my-app>loading...</my-app>
</body>
</html>
An application is bootstrapped inside an existing browser DOM, typically index.html.
Unlike Angular 1, Angular 2 does not compile/process providers in index.html. This is
mainly for security reasons, as well as architectural changes in Angular 2. This means
that index.html can safely be processed using server-side technologies such as
providers. Bindings can thus use double-curly {{ syntax }} without collision from
Angular 2 component double-curly {{ syntax }}.
We can use this script code:
{@example core/ts/bootstrap/bootstrap.ts region='bootstrap'}
When the app developer invokes bootstrap() with the root component MyApp as its
argument, Angular performs the following tasks:
selector property to locate the DOM element which needs
to be upgraded into the angular component.bootstrap with the
componentInjectableBindings argument.Zone and connects it to the angular application's change detection
domain instance.When working within a browser window, there are many singleton resources: cookies, title, location, and others. Angular services that represent these resources must likewise be shared across all Angular applications that occupy the same browser window. For this reason, Angular creates exactly one global platform object which stores all shared services, and each angular application injector has the platform injector as its parent.
Each application has its own private injector as well. When there are multiple applications on a page, Angular treats each application injector's services as private to that application.
appComponentType: The root component which should act as the application. This is
a reference to a Type which is annotated with @Component(...).customProviders: An additional set of providers that can be added to the
app injector to override default injection behavior.Returns a Promise of ComponentRef.
An array of providers that should be passed into application() when bootstrapping a component
when all templates
have been precompiled offline.
See bootstrap for more information.
Default application providers for testing.
Default patform providers for testing.
Default application providers for testing without a compiler.
Default patform providers for testing without a compiler.
Default application providers for testing.
Default patform providers for testing.
A list of directives. To use the router directives like RouterOutlet and
RouterLink, add this to your directives array in the View decorator of your
component.
``` import {Component} from 'angular2/core'; import {ROUTER_DIRECTIVES, ROUTER_PROVIDERS, RouteConfig} from 'angular2/router';
Enables the router link DSL.
Warning. This feature is experimental and can change.
To enable the transformer pass the router link DSL provider to bootstrap.
import {bootstrap} from 'angular2/platform/browser';
import {ROUTER_LINK_DSL_PROVIDER} from 'angular2/router/router_link_dsl';
bootstrap(CustomApp, [ROUTER_LINK_DSL_PROVIDER]);
The DSL allows you to express router links as follows:
<a [routerLink]="route:User"> <!-- Same as <a [routerLink]="['User']"> -->
<a [routerLink]="route:/User"> <!-- Same as <a [routerLink]="['User']"> -->
<a [routerLink]="route:./User"> <!-- Same as <a [routerLink]="['./User']"> -->
<a [routerLink]="./User(id: value, name: 'Bob')"> <!-- Same as <a [routerLink]="['./User', {id:
value, name: 'Bob'}]"> -->
<a [routerLink]="/User/Modal"> <!-- Same as <a [routerLink]="['/User', 'Modal']"> -->
<a [routerLink]="User[Modal]"> <!-- Same as <a [routerLink]="['User', ['Modal']]"> -->
Stores the start time and starts the animation
functions to be called upon completion
flag used to track whether or not the animation has finished
the animation delay (ms) (whether from CSS or manually set)
the duration (ms) of the animation (whether from CSS or manually set)
functions for removing event listeners
timestamp of when the animation started
total amount of time that the animation should take including delay
Adds the provided classes to the element
Adds events to track when animations have finished
Applies the provided styles to the element
Runs all animation callbacks and removes temporary classes
Adds animation callbacks to be called upon completion
Converts the duration string to the number of milliseconds
Removes the provided classes from the element
Sets up the initial styles before the animation is started
After the initial setup has occurred, this method adds the animation styles
Strips the letters from the duration string
Used for DI
Creates a new CSS Animation
Determines if event.elapsedTime includes transition delay in the current browser. At this
time, Chrome and Opera seem to be the only browsers that include this.
Accepts public properties for CssAnimationBuilder
Adds a temporary class that will be removed at the end of the animation
Adds a class that will remain on the element after the animation has finished
Removes a class from the element
Sets the animation delay (and overrides any defined through CSS)
Sets the animation duration (and overrides any defined through CSS)
Sets the initial styles for the animation
Sets styles for both the initial state and the destination state
Sets the destination styles for the animation
Starts the animation and returns a promise
classes to be added for the duration of the animation
classes to be added to the element
classes to be removed from the element
override the transition delay (in milliseconds)
override the duration of the animation (in milliseconds)
initial styles for the element
destination styles for the element
A collection of Angular core directives that are likely to be used in each and every Angular application. This includes core directives (e.g., NgIf and NgFor), and forms directives (e.g., NgModel).
This collection can be used to quickly enumerate all the built-in directives in the directives
property of the @Component decorator.
Instead of writing:
```typescript import {NgClass, NgIf, NgFor, NgSwitch, NgSwitchWhen, NgSwitchDefault, NgModel, NgForm} from 'angular2/common'; import {OtherDirective} from './myDirectives';
A collection of Angular core directives that are likely to be used in each and every Angular application.
This collection can be used to quickly enumerate all the built-in directives in the directives
property of the @Component annotation.
Instead of writing:
```typescript import {NgClass, NgIf, NgFor, NgSwitch, NgSwitchWhen, NgSwitchDefault} from 'angular2/common'; import {OtherDirective} from './myDirectives';
The NgClass directive conditionally adds and removes CSS classes on an HTML element based on
an expression's evaluation result.
The result of an expression evaluation is interpreted differently depending on type of the expression evaluation result:
string - all the CSS classes listed in a string (space delimited) are addedArray - all the CSS classes (Array elements) are addedObject - each key corresponds to a CSS class name while values are interpreted as expressions
evaluating to Boolean. If a given expression evaluates to true a corresponding CSS class
is added - otherwise it is removed.While the NgClass directive can interpret expressions evaluating to string, Array
or Object, the Object-based version is the most often used and has an advantage of keeping
all the CSS class names in a template.
``` import {Component} from 'angular2/core'; import {NgClass} from 'angular2/common';
The NgFor directive instantiates a template once per item from an iterable. The context for
each instantiated template inherits from the outer context with the given loop variable set
to the current item from the iterable.
NgFor provides several exported values that can be aliased to local variables:
index will be set to the current loop iteration for each template context.last will be set to a boolean value indicating whether the item is the last one in the
iteration.even will be set to a boolean value indicating whether this item has an even index.odd will be set to a boolean value indicating whether this item has an odd index.When the contents of the iterator changes, NgFor makes the corresponding changes to the DOM:
Angular uses object identity to track insertions and deletions within the iterator and reproduce
those changes in the DOM. This has important implications for animations and any stateful
controls
(such as <input> elements which accept user input) that are present. Inserted rows can be
animated in, deleted rows can be animated out, and unchanged rows retain any unsaved state such
as user input.
It is possible for the identities of elements in the iterator to change while the data does not. This can happen, for example, if the iterator produced from an RPC to the server, and that RPC is re-run. Even if the data hasn't changed, the second response will produce objects with different identities, and Angular will tear down the entire DOM and rebuild it (as if all old elements were deleted and all new elements inserted). This is an expensive operation and should be avoided if possible.
<li *ngFor="#item of items; #i = index">...</li><li template="ngFor #item of items; #i = index">...</li><template ngFor #item [ngForOf]="items" #i="index"><li>...</li></template>See a live demo for a more detailed example.
Removes or recreates a portion of the DOM tree based on an {expression}.
If the expression assigned to ngIf evaluates to a false value then the element
is removed from the DOM, otherwise a clone of the element is reinserted into the DOM.
<div *ngIf="errorCount > 0" class="error">
<!-- Error message displayed when the errorCount property on the current context is greater
than 0. -->
{{errorCount}} errors detected
</div>
<div *ngIf="condition">...</div><div template="ngIf condition">...</div><template [ngIf]="condition"><div>...</div></template>ngPlural is an i18n directive that displays DOM sub-trees that match the switch expression
value, or failing that, DOM sub-trees that match the switch expression's pluralization category.
To use this directive, you must provide an extension of NgLocalization that maps values to
category names. You then define a container element that sets the [ngPlural] attribute to a
switch expression.
[ngPluralCase] attribute will display based on their
expression.[ngPluralCase] is set to a value starting with =, it will only display if the value
matches the switch expression exactly.getPluralCategory
function provided.If no matching views are found for a switch expression, inner elements marked
[ngPluralCase]="other" will be displayed.
```typescript class MyLocalization extends NgLocalization { getPluralCategory(value: any) { if(value < 5) { return 'few'; } } }
The NgStyle directive changes styles based on a result of expression evaluation.
An expression assigned to the ngStyle property must evaluate to an object and the
corresponding element styles are updated based on changes to this object. Style names to update
are taken from the object's keys, and values - from the corresponding object's values.
<div [ngStyle]="{'font-style': style}"></div><div [ngStyle]="styleExp"></div> - here the styleExp must evaluate to an object``` import {Component} from 'angular2/core'; import {NgStyle} from 'angular2/common';
Adds or removes DOM sub-trees when their match expressions match the switch expression.
Elements within NgSwitch but without NgSwitchWhen or NgSwitchDefault directives will be
preserved at the location as specified in the template.
NgSwitch simply inserts nested elements based on which match expression matches the value
obtained from the evaluated switch expression. In other words, you define a container element
(where you place the directive with a switch expression on the
[ngSwitch]="..." attribute), define any inner elements inside of the directive and
place a [ngSwitchWhen] attribute per element.
The ngSwitchWhen property is used to inform NgSwitch which element to display when the
expression is evaluated. If a matching expression is not found via a ngSwitchWhen property
then an element with the ngSwitchDefault attribute is displayed.
```typescript
Default case statements are displayed when no match expression matches the switch expression value.
See NgSwitch for more details and example.
Insert the sub-tree when the ngSwitchWhen expression evaluates to the same value as the
enclosing switch expression.
If multiple match expression match the switch expression value, all of them are displayed.
See NgSwitch for more details and example.
This module exists in Dart, but not in Typescript. This exported symbol is only here to help Typescript think this is a module.
See FORM_PROVIDERS instead.
Shorthand set of providers used for building Angular forms.
bootstrap(MyApp, [FORM_PROVIDERS]);
A list of all the form directives used as part of a @Component annotation.
This is a shorthand for importing them each individually.
```typescript
Base class for control directives.
Only used internally in the forms module.
The accessor for writing a value and listening to changes on a checkbox input element.
<input type="checkbox" ngControl="rememberLogin">
A directive that contains multiple NgControls.
Only used by the forms module.
Get the form to which this container belongs.
Get the path to this container.
A bridge between a control and a native element.
A ControlValueAccessor abstracts the operations of writing a new value to a
DOM element representing an input control.
Please see DefaultValueAccessor for more information.
Set the function to be called when the control receives a change event.
Set the function to be called when the control receives a touch event.
Write a new value to the element.
Used to provide a ControlValueAccessor for form controls.
See DefaultValueAccessor for how to implement one.
The default accessor for writing a value and listening to changes that is used by the NgModel, NgFormControl, and NgControlName directives.
<input type="text" ngControl="searchQuery">
An interface that NgFormModel and NgForm implement.
Only used by the forms module.
Add a control to this form.
Add a group of controls to this form.
Look up the ControlGroup associated with a particular NgControlGroup.
Remove a control from this form.
Remove a group of controls from this form.
Update the model for a particular control with a new value.
A base class that all control directive extend. It binds a Control object to a DOM element.
Used internally by Angular forms.
Creates and binds a control group to a DOM element.
This directive can only be used as a child of NgForm or NgFormModel.
```typescript
Get the ControlGroup backing this binding.
Get the Form to which this group belongs.
Get the path to this control group.
Creates and binds a control with a specified name to a DOM element.
This directive can only be used as a child of NgForm or NgFormModel.
In this example, we create the login and password controls. We can work with each control separately: check its validity, get its value, listen to its changes.
```
Directive automatically applied to Angular forms that sets CSS classes based on control status (valid/invalid/dirty/etc).
If NgForm is bound in a component, <form> elements in that component will be
upgraded to use the Angular form system.
Include FORM_DIRECTIVES in the directives section of a View annotation
to use NgForm and its associated controls.
An Angular form is a collection of Controls in some hierarchy.
Controls can be at the top level or can be organized in ControlGroups
or ControlArrays. This hierarchy is reflected in the form's value, a
JSON object that mirrors the form structure.
The ngSubmit event signals when the user triggers a form submission.
```typescript
Binds an existing Control to a DOM element.
In this example, we bind the control to an input element. When the value of the input element changes, the value of the control will reflect that change. Likewise, if the value of the control changes, the input element reflects that change.
```typescript
Binds an existing control group to a DOM element.
In this example, we bind the control group to the form element, and we bind the login and password controls to the login and password elements.
```typescript
Binds a domain model to a form control.
ngModel binds an existing domain model to a form control. For a
two-way binding, use [(ngModel)] to ensure the model updates in
both directions.
```typescript
The accessor for writing a number value and listening to changes that is used by the NgModel, NgFormControl, and NgControlName directives.
<input type="number" [(ngModel)]="age">
The value provided by the forms API for radio buttons.
Internal class used by Angular to uncheck radio buttons with the matching name.
The accessor for writing a radio control value and listening to changes that is used by the NgModel, NgFormControl, and NgControlName directives.
@Component({
template: `
<input type="radio" name="food" [(ngModel)]="foodChicken">
<input type="radio" name="food" [(ngModel)]="foodFish">
`
})
class FoodCmp {
foodChicken = new RadioButtonState(true, "chicken");
foodFish = new RadioButtonState(false, "fish");
}
Marks <option> as dynamic, so Angular can be notified when options change.
<select ngControl="city">
<option *ngFor="#c of cities" [value]="c"></option>
</select>
The accessor for writing a value and listening to changes on a select element.
A directive which installs the MaxLengthValidator for any ngControl,ngFormControl,
or control withngModelthat also has amaxlength` attribute.
A directive which installs the MinLengthValidator for any ngControl,
ngFormControl, or control with ngModel that also has a minlength attribute.
A Directive that adds the required validator to any controls marked with the
required attribute, via the NG_VALIDATORS binding.
<input ngControl="fullName" required>
An interface that can be implemented by classes that can act as validators.
```typescript
Provider which adds MaxLengthValidator to NG_VALIDATORS.
{@example common/forms/ts/validators/validators.ts region='max'}
Provivder which adds MinLengthValidator to NG_VALIDATORS.
{@example common/forms/ts/validators/validators.ts region='min'}
A Directive that adds the pattern validator to any controls marked with the
pattern attribute, via the NG_VALIDATORS binding. Uses attribute value
as the regex to validate Control value against. Follows pattern attribute
semantics; i.e. regex must match entire Control value.
<input [ngControl]="fullName" pattern="[a-zA-Z ]*">
Construct an array of Controls from the given controlsConfig array of
configuration, with the given optional validator and asyncValidator.
Construct a new Control with the given value,validator, and asyncValidator.
Construct a new ControlGroup with the given map of configuration.
Valid keys for the extra parameter map are optionals and validator.
See the ControlGroup constructor for more details.
Returns the errors of this control.
Sets errors on a control.
This is used when validations are run not automatically, but manually by the user.
Calling setErrors will also update the validity of the parent control.
var login = new Control("someLogin");
login.setErrors({
"notUnique": true
});
expect(login.valid).toEqual(false);
expect(login.errors).toEqual({"notUnique": true});
login.updateValue("someOtherLogin");
expect(login.valid).toEqual(true);
Defines a part of a form that cannot be divided into other controls. Controls have values and
validation state, which is determined by an optional validation function.
Control is one of the three fundamental building blocks used to define forms in Angular, along
with ControlGroup and ControlArray.
By default, a Control is created for every <input> or other form component.
With NgFormControl or NgFormModel an existing Control can be
bound to a DOM element instead. This Control can be configured with a custom
validation function.
Returns the errors of this control.
Register a listener for change events.
Sets errors on a control.
This is used when validations are run not automatically, but manually by the user.
Calling setErrors will also update the validity of the parent control.
var login = new Control("someLogin");
login.setErrors({
"notUnique": true
});
expect(login.valid).toEqual(false);
expect(login.errors).toEqual({"notUnique": true});
login.updateValue("someOtherLogin");
expect(login.valid).toEqual(true);
Set the value of the control to value.
If onlySelf is true, this change will only affect the validation of this Control
and not its parent component. If emitEvent is true, this change will cause a
valueChanges event on the Control to be emitted. Both of these options default to
false.
If emitModelToViewChange is true, the view will be notified about the new value
via an onChange event. This is the default behavior if emitModelToViewChange is not
specified.
Defines a part of a form, of variable length, that can contain other controls.
A ControlArray aggregates the values of each Control in the group.
The status of a ControlArray depends on the status of its children.
If one of the controls in a group is invalid, the entire array is invalid.
Similarly, if a control changes its value, the entire array changes as well.
ControlArray is one of the three fundamental building blocks used to define forms in Angular,
along with Control and ControlGroup. ControlGroup can also contain
other controls, but is of fixed length.
To change the controls in the array, use the push, insert, or removeAt methods
in ControlArray itself. These methods ensure the controls are properly tracked in the
form's hierarchy. Do not modify the array of AbstractControls used to instantiate
the ControlArray directly, as that will result in strange and unexpected behavior such
as broken change detection.
Returns the errors of this control.
Length of the control array.
Get the AbstractControl at the given index in the array.
Insert a new AbstractControl at the given index in the array.
Insert a new AbstractControl at the end of the array.
Remove the control at the given index in the array.
Sets errors on a control.
This is used when validations are run not automatically, but manually by the user.
Calling setErrors will also update the validity of the parent control.
var login = new Control("someLogin");
login.setErrors({
"notUnique": true
});
expect(login.valid).toEqual(false);
expect(login.errors).toEqual({"notUnique": true});
login.updateValue("someOtherLogin");
expect(login.valid).toEqual(true);
Defines a part of a form, of fixed length, that can contain other controls.
A ControlGroup aggregates the values of each Control in the group.
The status of a ControlGroup depends on the status of its children.
If one of the controls in a group is invalid, the entire group is invalid.
Similarly, if a control changes its value, the entire group changes as well.
ControlGroup is one of the three fundamental building blocks used to define forms in Angular,
along with Control and ControlArray. ControlArray can also contain other
controls, but is of variable length.
Returns the errors of this control.
Add a control to this group.
Check whether there is a control with the given name in the group.
Mark the named control as optional.
Mark the named control as non-optional.
Remove a control from this group.
Sets errors on a control.
This is used when validations are run not automatically, but manually by the user.
Calling setErrors will also update the validity of the parent control.
var login = new Control("someLogin");
login.setErrors({
"notUnique": true
});
expect(login.valid).toEqual(false);
expect(login.errors).toEqual({"notUnique": true});
login.updateValue("someOtherLogin");
expect(login.valid).toEqual(true);
Indicates that a Control is invalid, i.e. that an error exists in the input value.
Indicates that a Control is pending, i.e. that async validation is occurring and errors are not yet available for the input value.
Indicates that a Control is valid, i.e. that no errors exist in the input value.
Provides a set of validators used by form controls.
A validator is a function that processes a Control or collection of controls and returns a map of errors. A null map means that validation has passed.
var loginControl = new Control("", Validators.required)
Compose multiple validators into a single function that returns the union of the individual error maps.
Validator that requires controls to have a value of a maximum length.
Validator that requires controls to have a value of a minimum length.
No-op validator.
Validator that requires a control to match a regex to its value.
Validator that requires controls to have a non-empty value.
Providers for asynchronous validators to be used for Controls in a form.
Provide this using multi: true to add validators.
See NG_VALIDATORS for more details.
Providers for validators to be used for Controls in a form.
Provide this using multi: true to add validators.
{@example core/forms/ts/ng_validators/ng_validators.ts region='ng_validators'}
The async pipe subscribes to an Observable or Promise and returns the latest value it has
emitted.
When a new value is emitted, the async pipe marks the component to be checked for changes.
This example binds a Promise to the view. Clicking the Resolve button resolves the
promise.
{@example core/pipes/ts/async_pipe/async_pipe_example.ts region='AsyncPipe'}
It's also possible to use async with Observables. The example below binds the time Observable
to the view. Every 500ms, the time Observable updates the view with the current time.
A collection of Angular core pipes that are likely to be used in each and every application.
This collection can be used to quickly enumerate all the built-in pipes in the pipes
property of the @Component decorator.
Formats a date value to a string based on the requested format.
WARNINGS:
expression | date[:format]
where expression is a date object or a number (milliseconds since UTC epoch) and
format indicates which date/time components to include:
| Component | Symbol | Short Form | Long Form | Numeric | 2-digit |
|---|---|---|---|---|---|
| era | G | G (AD) | GGGG (Anno Domini) | - | - |
| year | y | - | - | y (2015) | yy (15) |
| month | M | MMM (Sep) | MMMM (September) | M (9) | MM (09) |
| day | d | - | - | d (3) | dd (03) |
| weekday | E | EEE (Sun) | EEEE (Sunday) | - | - |
| hour | j | - | - | j (13) | jj (13) |
| hour12 | h | - | - | h (1 PM) | hh (01 PM) |
| hour24 | H | - | - | H (13) | HH (13) |
| minute | m | - | - | m (5) | mm (05) |
| second | s | - | - | s (9) | ss (09) |
| timezone | z | - | z (Pacific Standard Time) | - | - |
| timezone | Z | Z (GMT-8:00) | - | - | - |
In javascript, only the components specified will be respected (not the ordering, punctuations, ...) and details of the formatting will be dependent on the locale. On the other hand in Dart version, you can also include quoted text as well as some extra date/time components such as quarter. For more information see: https://api.dartlang.org/apidocs/channels/stable/dartdoc-viewer/intl/intl.DateFormat.
format can also be one of the following predefined formats:
'medium': equivalent to 'yMMMdjms' (e.g. Sep 3, 2010, 12:05:08 PM for en-US)'short': equivalent to 'yMdjm' (e.g. 9/3/2010, 12:05 PM for en-US)'fullDate': equivalent to 'yMMMMEEEEd' (e.g. Friday, September 3, 2010 for en-US)'longDate': equivalent to 'yMMMMd' (e.g. September 3, 2010)'mediumDate': equivalent to 'yMMMd' (e.g. Sep 3, 2010 for en-US)'shortDate': equivalent to 'yMd' (e.g. 9/3/2010 for en-US)'mediumTime': equivalent to 'jms' (e.g. 12:05:08 PM for en-US)'shortTime': equivalent to 'jm' (e.g. 12:05 PM for en-US)Timezone of the formatted text will be the local system timezone of the end-users machine.
Assuming dateObj is (year: 2015, month: 6, day: 15, hour: 21, minute: 43, second: 11)
in the local time and locale is 'en-US':
{{ dateObj | date }} // output is 'Jun 15, 2015'
{{ dateObj | date:'medium' }} // output is 'Jun 15, 2015, 9:43:11 PM'
{{ dateObj | date:'shortTime' }} // output is '9:43 PM'
{{ dateObj | date:'mmss' }} // output is '43:11'
{@example core/pipes/ts/date_pipe/date_pipe_example.ts region='DatePipe'}
Maps a value to a string that pluralizes the value properly.
expression | i18nPlural:mapping
where expression is a number and mapping is an object that indicates the proper text for
when the expression evaluates to 0, 1, or some other number. You can interpolate the actual
value into the text using the # sign.
<div>
{{ messages.length | i18nPlural: messageMapping }}
</div>
class MyApp {
messages: any[];
messageMapping: any = {
'=0': 'No messages.',
'=1': 'One message.',
'other': '# messages.'
}
...
}
Generic selector that displays the string that matches the current value.
expression | i18nSelect:mapping
where mapping is an object that indicates the text that should be displayed
for different values of the provided expression.
<div>
{{ gender | i18nSelect: inviteMap }}
</div>
class MyApp {
gender: string = 'male';
inviteMap: any = {
'male': 'Invite her.',
'female': 'Invite him.',
'other': 'Invite them.'
}
...
}
Transforms any input value using JSON.stringify. Useful for debugging.
{@example core/pipes/ts/json_pipe/json_pipe_example.ts region='JsonPipe'}
Transforms text to lowercase.
{@example core/pipes/ts/lowerupper_pipe/lowerupper_pipe_example.ts region='LowerUpperPipe'}
WARNING: this pipe uses the Internationalization API. Therefore it is only reliable in Chrome and Opera browsers.
Formats a number as local currency.
expression | currency[:currencyCode[:symbolDisplay[:digitInfo]]]
where currencyCode is the ISO 4217 currency code, such as "USD" for the US dollar and
"EUR" for the euro. symbolDisplay is a boolean indicating whether to use the currency
symbol (e.g. $) or the currency code (e.g. USD) in the output. The default for this value
is false.
For more information about digitInfo see DecimalPipe
{@example core/pipes/ts/number_pipe/number_pipe_example.ts region='CurrencyPipe'}
WARNING: this pipe uses the Internationalization API. Therefore it is only reliable in Chrome and Opera browsers.
Formats a number as local text. i.e. group sizing and separator and other locale-specific configurations are based on the active locale.
expression | number[:digitInfo]
where expression is a number and digitInfo has the following format:
{minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}
For more information on the acceptable range for each of these numbers and other details see your native internationalization library.
{@example core/pipes/ts/number_pipe/number_pipe_example.ts region='NumberPipe'}
Internal base class for numeric pipes.
WARNING: this pipe uses the Internationalization API. Therefore it is only reliable in Chrome and Opera browsers.
Formats a number as local percent.
expression | percent[:digitInfo]
For more information about digitInfo see DecimalPipe
{@example core/pipes/ts/number_pipe/number_pipe_example.ts region='PercentPipe'}
Creates a new String with some or all of the matches of a pattern replaced by a replacement.
The pattern to be matched is specified by the 'pattern' parameter.
The replacement to be set is specified by the 'replacement' parameter.
An optional 'flags' parameter can be set.
expression | replace:pattern:replacement
All behavior is based on the expected behavior of the JavaScript API String.prototype.replace() function.
Where the input expression is a [String] or [Number] (to be treated as a string),
the pattern is a [String] or [RegExp],
the 'replacement' is a [String] or [Function].
--Note--: The 'pattern' parameter will be converted to a RegExp instance. Make sure to escape the string properly if you are matching for regular expression special characters like parenthesis, brackets etc.
Creates a new List or String containing only a subset (slice) of the elements.
The starting index of the subset to return is specified by the start parameter.
The ending index of the subset to return is specified by the optional end parameter.
expression | slice:start[:end]
All behavior is based on the expected behavior of the JavaScript API Array.prototype.slice() and String.prototype.slice()
Where the input expression is a [List] or [String], and start is:
|start| greater than the size of the expression: return an empty list or string.|start| negative greater than the size of the expression: return entire list or
string expression.and where end is:
When operating on a [List], the returned list is always a copy even when all the elements are being returned.
This ngFor example:
{@example core/pipes/ts/slice_pipe/slice_pipe_example.ts region='SlicePipe_list'}
produces the following:
<li>b</li>
<li>c</li>
{@example core/pipes/ts/slice_pipe/slice_pipe_example.ts region='SlicePipe_string'}
Implements uppercase transforms to text.
{@example core/pipes/ts/lowerupper_pipe/lowerupper_pipe_example.ts region='LowerUpperPipe'}
A set of providers that provide RuntimeCompiler and its dependencies to use for
template compilation.
Metadata regarding compilation of a directive.
Metadata regarding compilation of a template.
Metadata regarding compilation of a type.
Construct CompileDirectiveMetadata from {@link ComponentTypeMetadata} and a selector.
Convert templates to the case sensitive syntax
Wrap the stringify method to avoid naming things function (arg1...) {
A css selector contains an element name, css classes and attribute/value pairs with the purpose of selecting subsets out of them.
Gets a template string for an element that matches the selector.
Reads a list of CssSelectors and allows to calculate which ones are contained in a given CssSelector.
Add an object that can be found later on by calling match.
A css selector
An opaque object that will be given to the callback of the match function
Find the objects that have been added via addSelectable
whose css selector is contained in the given css selector.
A css selector
This callback will be called with the object handed into addSelectable
boolean true if a match was found
This file is a port of shadowCSS from webcomponents.js to TypeScript.
Please make sure to keep to edits in sync with the source file.
Source: https://github.com/webcomponents/webcomponentsjs/blob/4efecd7e0e/src/ShadowCSS/ShadowCSS.js
The original file level comment is reproduced below
Represents generated source code with module references. Internal to the Angular compiler.
Represents generated source code with imports. Internal to the Angular compiler.
Rewrites stylesheets by resolving and removing the @import urls that
are either relative or don't have a package: scheme
Enumeration of types of property bindings.
A binding to an element attribute (e.g. [attr.name]="expression").
A binding to a CSS class (e.g. [class.name]="condition").
A normal binding to a property (e.g. [property]="expression").
A binding to a style rule (e.g. [style.rule]="expression").
A plain attribute on an element.
A directive property with a bound value (e.g. `*ngIf="condition").
A binding for an element property (e.g. [property]="expression").
A binding for an element event (e.g. (event)="handler()").
A bound expression within the text of a template.
A directive declared on an element.
An element declaration in a template.
Get the component associated with this element, if any.
Whether the element has any active bindings (inputs, outputs, vars, or directives).
A <template> element included in an Angular template.
Position where content is to be projected (instance of <ng-content> in a template).
A segment of text within the template.
A variable declaration on an element (e.g. #var="expression").
An Abstract Syntax Tree node representing part of a parsed Angular template.
The source span from which this node was parsed.
Visit this node and possibly transform it.
A visitor for TemplateAst trees that will process each node.
Visit every node in a list of TemplateAsts with the given TemplateAstVisitor.
An internal module of the Angular compiler that begins with component types, extracts templates, and eventually produces a compiled version of the component ready for linking into an application.
Provides an array of TemplateAstVisitors which will be used to transform parsed templates before compilation is invoked, allowing custom expression syntax and other advanced transformations.
This is currently an internal-only feature and not meant for general use.
The index of each URI component in the return value of goog.uri.utils.split.
Used by the Compiler when resolving HTML and CSS template URLs.
This class can be overridden by the application developer to create custom behavior.
See Compiler
{@example compiler/ts/url_resolver/url_resolver.ts region='url_resolver'}
Resolves the url given the baseUrl:
url is null, the baseUrl is returned,url is relative ('path/to/here', './path/to/here'), the resolved url is a combination of
baseUrl and url,url is absolute (it has a scheme: 'http://', 'https://' or start with '/'), the url is
returned as is (ignoring the baseUrl)the resolved URL
A default provider for PACKAGE_ROOT_URL that maps to '/'.
A regular expression for breaking a URI into its component parts.
http://www.gbiv.com/protocols/uri/rfc/rfc3986.html#RFC2234 says As the "first-match-wins" algorithm is identical to the "greedy" disambiguation method used by POSIX regular expressions, it is natural and commonplace to use a regular expression for parsing the potential five components of a URI reference.
The following line is the regular expression for breaking-down a well-formed URI reference into its components.
^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))? 12 3 4 5 6 7 8 9
The numbers in the second line above are only to assist readability; they
indicate the reference points for each subexpression (i.e., each paired
parenthesis). We refer to the value matched for subexpression
http://www.ics.uci.edu/pub/ietf/uri/#Related
results in the following subexpression matches:
$1 = http: $2 = http $3 = //www.ics.uci.edu $4 = www.ics.uci.edu $5 = /pub/ietf/uri/ $6 =where$7 = $8 = #Related $9 = Related
scheme = $2 authority = $4 path = $5 query = $7 fragment = $9
The regular expression has been modified slightly to expose the userInfo, domain, and port separately from the authority. The modified version yields
$1 = http scheme $2 =userInfo -\ $3 = www.ics.uci.edu domain | authority $4 = port -/ $5 = /pub/ietf/uri/ path $6 = query without ? $7 = Related fragment without #
Builds a URI string from already-encoded parts.
No encoding is performed. Any component may be omitted as either null or undefined.
The scheme such as 'http'.
The user name before the '@'.
The domain such as 'www.google.com', already URI-encoded.
The port number.
The path, already URI-encoded. If it is not empty, it must begin with a slash.
The URI-encoded query data.
The URI-encoded fragment identifier.
The fully combined URI.
Takes an array of the parts from split and canonicalizes the path part and then joins all the parts.
Removes dot segments in given path component, as described in RFC 3986, section 5.2.4.
A non-empty path component.
Path component with removed dot segments.
Resolves a URL.
The URL acting as the base URL.
Splits a URI into its component parts.
Each component can be accessed via the component indices; for example:
goog.uri.utils.split(someStr)[goog.uri.utils.CompontentIndex.QUERY_DATA];
The URI string to examine.
Each component still URI-encoded. Each component that is present will contain the encoded value, whereas components that are not present will be undefined or empty, depending on the browser's regular expression implementation. Never null, since arbitrary strings may still look like path names.
Create a UrlResolver with no package prefix.
Extract the scheme of a URL.
An interface for retrieving documents by URL that the compiler uses to load templates.
A mock implementation of XHR that allows outgoing requests to be mocked and responded to within a single test, without going to the network.
Add an expectation for the given URL. Incoming requests will be checked against
the next expectation (in FIFO order). The verifyNoOutstandingExpectations method
can be used to check if any expectations have not yet been met.
The response given will be returned if the expectation matches.
Process pending requests and verify there are no outstanding expectations. Also fails if no requests are pending.
Throw an exception if any expectations have not been satisfied.
Add a definition for the given URL to return the given response. Unlike expectations,
definitions have no order and will satisfy any matching request at any time. Also
unlike expectations, unused definitions do not cause verifyNoOutstandingExpectations
to return an error.
Marks a function or method as an Angular 2 entrypoint. Only necessary in Dart code.
The optional name parameter will be reflected in logs when the entry point is processed.
See the wiki for detailed documentation.
```
A default set of providers which should be included in any Angular application, regardless of the platform it runs onto.
A reference to an Angular application running on a page.
For more about Angular applications, see the documentation for bootstrap.
Get a list of component types registered to this application.
Retrieve the application Injector.
Retrieve the application NgZone.
Bootstrap a new component at the root level of the application.
When bootstrapping a new root component into an application, Angular mounts the specified application component onto DOM elements identified by the [componentType]'s selector and kicks off automatic change detection to finish initializing the component.
Providers for the given component can optionally be overridden via the providers
parameter. These providers will only apply for the root component being added and any
child components under it.
{@example core/ts/platform/platform.ts region='longform'}
Dispose of this application and all of its components.
Register a listener to be called each time bootstrap() is called to bootstrap
a new root component.
Register a listener to be called when the application is disposed.
Invoke this method to explicitly process change detection and its side-effects.
In development mode, tick() also performs a second change detection cycle to ensure that no
further changes are detected. If additional changes are picked up during this second cycle,
bindings in the app have side-effects that cannot be resolved in a single change detection
pass.
In this case, Angular throws an error, since an Angular application can only have one change
detection pass during which all change detection must complete.
The Angular platform is the entry point for Angular on a web page. Each page has exactly one platform, and services (such as reflection) which are common to every Angular application running on the page are bound in its scope.
A page's platform is initialized implicitly when bootstrap() is called, or explicitly by calling platform().
Retrieve the platform Injector, which is the parent injector for every Angular application on the page and provides singleton providers.
Instantiate a new Angular application on the page.
Each Angular application has its own zone, change detection, compiler,
renderer, and other framework components. An application hosts one or more
root components, which can be initialized via ApplicationRef.bootstrap().
Angular applications require numerous providers to be properly instantiated.
When using application() to create a new app on the page, these providers
must be provided. Fortunately, there are helper functions to configure
typical providers, as shown in the example below.
{@example core/ts/platform/platform.ts region='longform'}
See the bootstrap documentation for more details.
Instantiate a new Angular application on the page, using providers which are only available asynchronously. One such use case is to initialize an application running in a web worker.
bindingFn is a function that will be called in the new application's zone.
It should return a Promise to a list of providers to be used for the
new application. Once this promise resolves, the application will be
constructed in the same manner as a normal application().
Destroy the Angular platform and all Angular applications on the page.
Register a listener to be called when the platform is disposed.
Construct providers specific to an individual root component.
Create an Angular zone.
Dispose the existing platform.
Initialize the Angular 'platform' on the page.
See PlatformRef for details on the Angular platform.
It is also possible to specify providers to be made in the new platform. These providers will be shared between all applications on the page. For example, an abstraction for the browser cookie jar should be bound at the platform level, because there is only one cookie jar regardless of how many applications on the page will be accessing it.
The platform function can be called multiple times as long as the same list of providers is passed into each call. If the platform function is called with a different set of provides, Angular will throw an exception.
An {@link angular2/di/OpaqueToken} representing the application root type in the Injector.
```
@internal
A DI Token representing a unique string id assigned to the application by Angular and used primarily for prefixing application attributes and CSS styles when {@link ViewEncapsulation#Emulated} is being used.
If you need to avoid randomly generated value to be used as an application id, you can provide a custom value via a DI provider configuring the root Injector using this token.
Providers that will generate a random APP_ID_TOKEN.
A function that will be executed when an application is initialized.
A token which indicates the root directory of the application
A function that will be executed when a platform is initialized.
Structural diffing for Iterable types such as Arrays.
Structural diffing for Objects and Maps.
The code generator takes a list of proto records and creates a function/class that "emulates" what the developer would write by hand to implement the same kind of behaviour.
This code should be kept in sync with the Dart transformer's
angular2.transform.template_compiler.change_detector_codegen library. If you make updates
here, please make equivalent changes there.
Represents a basic change from a previous to a new value.
Check whether the new value is the first value assigned.
Indicates that the result of a PipeMetadata transformation has changed even though the reference has not changed.
The wrapped value will be unwrapped by change detection, and the unwrapped value will be stored.
Example:
if (this._latestValue === this._latestReturnedValue) {
return this._latestReturnedValue;
} else {
this._latestReturnedValue = this._latestValue;
return WrappedValue.wrap(this._latestValue); // this will force update
}
Checks the change detector and its children, and throws if any changes are detected.
This is used in development mode to verify that running change detection doesn't introduce other changes.
Detaches the change detector from the change detector tree.
The detached change detector will not be checked until it is reattached.
This can also be used in combination with {@link ChangeDetectorRef#detectChanges} to implement local change detection checks.
The following example defines a component with a large list of readonly data. Imagine the data changes constantly, many times per second. For performance reasons, we want to check and update the list every five seconds. We can do that by detaching the component's change detector and doing a local check every five seconds.
```typescript class DataProvider { // in a real application the returned data will be different every time get data() { return [1,2,3,4,5]; } }
Checks the change detector and its children.
This can also be used in combination with {@link ChangeDetectorRef#detach} to implement local change detection checks.
The following example defines a component with a large list of readonly data. Imagine, the data changes constantly, many times per second. For performance reasons, we want to check and update the list every five seconds.
We can do that by detaching the component's change detector and doing a local change detection check every five seconds.
See {@link ChangeDetectorRef#detach} for more information.
Marks all {@link ChangeDetectionStrategy#OnPush} ancestors as to be checked.
```typescript
Reattach the change detector to the change detector tree.
This also marks OnPush ancestors as to be checked. This reattached change detector will be checked during the next change detection run.
The following example creates a component displaying live data. The component will detach
its change detector from the main change detector tree when the component's live property
is set to false.
```typescript class DataProvider { data = 1;
constructor() { setInterval(() => { this.data = this.data * 2; }, 500); } }
Clone the ProtoRecord and changes the indexes for the ones in the destination array for:
Returns the first ProtoRecord that matches the record.
Add a new record or re-use one of the existing records.
Returns the index in the destination array corresponding to the index in the src array. When the element is not present in the destination array, return the source index.
Removes "duplicate" records. It assumes that record evaluation does not have side-effects.
Records that are not last in bindings are removed and all the indices of the records that depend on them are updated.
Records that are last in bindings CANNOT be removed, and instead are replaced with very cheap SELF records.
Converts funcOrValue to a string which can be used in generated code.
Combine the strings of generated code into a single interpolated string.
Each element of vals is expected to be a string literal or a codegen'd
call to a method returning a string.
Class responsible for providing change detection logic for change detector classes.
Generates a statement which updates the local variable representing protoRec with the current
value of the record. Used by event bindings.
Generates a statement which updates the local variable representing protoRec with the current
value of the record. Used by property bindings.
Class responsible for providing field and local variable names for change detector classes. Also provides some convenience functions, for example, declaring variables, destroying pipes, and dehydrating the detector.
Record names sanitized for use as fields. See [sanitizeName] for details.
Generates statements which clear all fields so that the change detector is dehydrated.
Generate a statement initializing local variables for event handlers.
Generate a statement initializing local variables used when detecting changes.
Generates statements destroying all pipe variables.
Returns s with all non-identifier characters removed.
Describes within the change detector which strategy will be used the next time change detection is triggered.
CheckAlways means that after calling detectChanges the mode of the change detector
will remain CheckAlways.
CheckedOnce means that after calling detectChanges the mode of the change detector
will become Checked.
Checked means that the change detector should be skipped until its mode changes to
CheckOnce.
Default means that the change detector's mode will be set to CheckAlways during hydration.
Detached means that the change detector sub tree is not a part of the main tree and
should be skipped.
OnPush means that the change detector's mode will be set to CheckOnce during hydration.
Describes the current state of the change detector.
CheckedBefore means that the change detector has successfully completed at least
one detection previously.
Errored means that the change detector encountered an error checking a binding
or calling a directive lifecycle method and is now in an inconsistent state. Change
detectors in this state will no longer detect changes.
NeverChecked means that the change detector has not been checked yet, and
initialization methods should be called during detection.
List of possible ChangeDetectionStrategy values.
List of possible ChangeDetectorState values.
This is the core function which handles differences between collections.
record is the record which we saw at this position last time. If null then it is a new
item.item is the current item in the collectionindex is the position of the item in the collectionReset the state of the change objects to show no changes. This means set previousKey to currentKey, and clear all of the queues (additions, moves, removals). Set the previousIndexes of moved and added items to their currentIndexes Reset the list of additions, moves and removals
Get rid of any excess CollectionChangeRecords from the previous collection
record The first excess CollectionChangeRecord.This check is only needed if an array contains duplicates. (Short circuit of nothing dirty)
Use case: [a, a] => [b, a, a]
If we did not have this check then the insertion of b would:
1) evict first a
2) insert b at 0 index.
3) leave a at index 1 as is. <-- this is wrong!
3) reinsert a at index 2. <-- this is wrong!
The correct behavior is:
1) evict first a
2) insert b at 0 index.
3) reinsert a at index 1.
3) move a at from 1 to 2.
Double check that we have not evicted a duplicate item. We need to check if the item type may have already been removed: The insertion of b will evict the first 'a'. If we don't reinsert it now it will be reinserted at the end. Which will show up as the two 'a's switching position. This is incorrect, since a better way to think of it is as insert of 'b' rather then switch 'a' with 'b' and then add 'a' at the end.
Append the record to the list of duplicates.
Note: by design all records in the list of duplicates hold the same value in record.item.
Remove one CollectionChangeRecord from the list of duplicates.
Returns whether the list of duplicates is empty.
Retrieve the value using key. Because the CollectionChangeRecord value may be one which we
have already iterated over, we use the afterIndex to pretend it is not there.
Use case: [a, b, c, a, a] if we are at index 3 which is the second a then asking if we
have any more as needs to return the last a not the first or second.
Removes a CollectionChangeRecord from the list of duplicates.
The list of duplicates also is removed from the map if it gets empty.
A repository of different iterable diffing strategies used by NgFor, NgClass, and others.
Takes an array of IterableDifferFactory and returns a provider used to extend the inherited IterableDiffers instance with the provided factories and return a new IterableDiffers instance.
The following example shows how to extend an existing list of factories, which will only be applied to the injector for this component and its children. This step is all that's required to make a new IterableDiffer available.
```
A strategy for tracking changes over time to an iterable. Used for NgFor to respond to changes in an iterable by effecting equivalent changes in the DOM.
Provides a factory for IterableDiffer.
An optional function passed into NgFor that defines how to track items in an iterable (e.g. by index or id)
A repository of different Map diffing strategies used by NgClass, NgStyle, and others.
Takes an array of KeyValueDifferFactory and returns a provider used to extend the inherited KeyValueDiffers instance with the provided factories and return a new KeyValueDiffers instance.
The following example shows how to extend an existing list of factories, which will only be applied to the injector for this component and its children. This step is all that's required to make a new KeyValueDiffer available.
```
A differ that tracks changes made to an object over time.
Provides a factory for KeyValueDiffer.
Thrown when an expression evaluation raises an exception.
This error wraps the original exception to attach additional contextual information that can be useful for debugging.
```typescript
Information about the expression that triggered the exception.
Thrown when change detector executes on dehydrated view.
This error indicates a bug in the framework.
This is an internal Angular error.
Wraps an exception thrown by an event handler.
Error context included when an event handler throws an exception.
An error thrown if application changes model breaking the top-down data flow.
This exception is only thrown in dev mode.
```typescript
Multiple expressions separated by a semicolon.
Represents a quoted expression of the form:
quote = prefix : uninterpretedExpression
prefix = identifier
uninterpretedExpression = arbitrary string
A quoted expression is meant to be pre-processed by an AST transformer that
converts it into another AST that no longer contains quoted expressions.
It is meant to allow third-party developers to extend Angular template
expression language. The uninterpretedExpression part of the quote is
therefore not interpreted by the Angular's own expression parser.
Tokenize a 2/3 char long operator
start index in the expression
first symbol (always part of the operator)
code point for the second symbol
second symbol (part of the operator when the second code point matches)
code point for the third symbol
third symbol (part of the operator when provided and matches source expression)
An identifier, a keyword, a string with an optional - inbetween.
To create a Pipe, you must implement this interface.
Angular invokes the transform method with the value of a binding
as the first argument, and any parameters as the second argument in list form.
value | pipeName[:arg0[:arg1...]]
The RepeatPipe below repeats the value as many times as indicated by the first argument:
``` import {Pipe, PipeTransform} from 'angular2/core';
Adds a ProtoRecord and returns its selfIndex.
Used only in debug mode to serialize property changes to comment nodes, such as placeholders.
Used only in development mode to set information needed by the DebugNode for this element.
Factory for creating HostMetadata.
Factory for creating InjectMetadata.
Factory for creating InjectableMetadata.
Factory for creating OptionalMetadata.
Factory for creating SelfMetadata.
Factory for creating SkipSelfMetadata.
Factory for creating HostMetadata.
Factory for creating InjectMetadata.
Factory for creating InjectableMetadata.
Factory for creating OptionalMetadata.
Factory for creating SelfMetadata.
Factory for creating SkipSelfMetadata.
Base class for all errors arising from misconfigured providers.
Thrown when dependencies form a cycle.
var injector = Injector.resolveAndCreate([
provide("one", {useFactory: (two) => "two", deps: [[new Inject("two")]]}),
provide("two", {useFactory: (one) => "one", deps: [[new Inject("one")]]})
]);
expect(() => injector.get("one")).toThrowError();
Retrieving A or B throws a CyclicDependencyError as the graph above cannot be constructed.
Thrown when a constructing type returns with an Error.
The InstantiationError class contains the original error plus the dependency graph which caused
this object to be instantiated.
class A {
constructor() {
throw new Error('message');
}
}
var injector = Injector.resolveAndCreate([A]);
try {
injector.get(A);
} catch (e) {
expect(e instanceof InstantiationError).toBe(true);
expect(e.originalException.message).toEqual("message");
expect(e.originalStack).toBeDefined();
}
expect(() => Injector.resolveAndCreate(["not a type"])).toThrowError();
Thrown when a multi provider and a regular provider are bound to the same token.
expect(() => Injector.resolveAndCreate([
new Provider("Strings", {useValue: "string1", multi: true}),
new Provider("Strings", {useValue: "string2", multi: false})
])).toThrowError();
Thrown when the class has no annotation information.
Lack of annotation information prevents the Injector from determining which dependencies need to be injected into the constructor.
class A {
constructor(b) {}
}
expect(() => Injector.resolveAndCreate([A])).toThrowError();
This error is also thrown when the class not marked with Injectable has parameter types.
class B {}
class A {
constructor(b:B) {} // no information about the parameter types of A is available at runtime.
}
expect(() => Injector.resolveAndCreate([A,B])).toThrowError();
Thrown when trying to retrieve a dependency by Key from Injector, but the
Injector does not have a Provider for Key.
class A {
constructor(b:B) {}
}
expect(() => Injector.resolveAndCreate([A])).toThrowError();
Thrown when getting an object by index.
class A {}
var injector = Injector.resolveAndCreate([A]);
expect(() => injector.getAt(100)).toThrowError();
An interface that a function passed into forwardRef has to implement.
{@example core/di/ts/forward_ref/forward_ref.ts region='forward_ref_fn'}
Allows to refer to references which are not yet defined.
For instance, forwardRef is used when the token which we need to refer to for the purposes of
DI is declared,
but not yet defined. It is also used when the token which we use when creating a query is not
yet defined.
{@example core/di/ts/forward_ref/forward_ref.ts region='forward_ref'}
Lazily retrieves the reference value from a forwardRef.
Acts as the identity function when given a non-forward-ref value.
var ref = forwardRef(() => "refValue");
expect(resolveForwardRef(ref)).toEqual("refValue");
expect(resolveForwardRef("regularValue")).toEqual("regularValue");
See: forwardRef
Visibility of a Provider.
A Private Provider is only visible to host (as opposed to regular) child injectors.
A Public Provider is only visible to regular (as opposed to host) child injectors.
A PublicAndPrivate Provider is visible to both host and regular child injectors.
A dependency injection container used for instantiating objects and resolving dependencies.
An Injector is a replacement for a new operator, which can automatically resolve the
constructor dependencies.
In typical use, application code asks for the dependencies in the constructor and they are
resolved by the Injector.
The following example creates an Injector configured to create Engine and Car.
```typescript
Whether this injector is a boundary to a host.
Parent of this injector.
var parent = Injector.resolveAndCreate([]);
var child = parent.resolveAndCreateChild([]);
expect(child.parent).toBe(parent);
Creates a child injector from previously resolved providers.
This API is the recommended way to construct injectors in performance-sensitive parts.
class ParentProvider {}
class ChildProvider {}
var parentProviders = Injector.resolve([ParentProvider]);
var childProviders = Injector.resolve([ChildProvider]);
var parent = Injector.fromResolvedProviders(parentProviders);
var child = parent.createChildFromResolved(childProviders);
expect(child.get(ParentProvider) instanceof ParentProvider).toBe(true);
expect(child.get(ChildProvider) instanceof ChildProvider).toBe(true);
expect(child.get(ParentProvider)).toBe(parent.get(ParentProvider));
Retrieves an instance from the injector based on the provided token. Throws NoProviderError if not found.
var injector = Injector.resolveAndCreate([
provide("validToken", {useValue: "Value"})
]);
expect(injector.get("validToken")).toEqual("Value");
expect(() => injector.get("invalidToken")).toThrowError();
Injector returns itself when given Injector as a token.
var injector = Injector.resolveAndCreate([]);
expect(injector.get(Injector)).toBe(injector);
Retrieves an instance from the injector based on the provided token. Returns null if not found.
var injector = Injector.resolveAndCreate([
provide("validToken", {useValue: "Value"})
]);
expect(injector.getOptional("validToken")).toEqual("Value");
expect(injector.getOptional("invalidToken")).toBe(null);
Injector returns itself when given Injector as a token.
var injector = Injector.resolveAndCreate([]);
expect(injector.getOptional(Injector)).toBe(injector);
Instantiates an object using a resolved provider in the context of the injector.
The created object does not get cached by the injector.
```typescript
Resolves an array of providers and creates a child injector from those providers.
The passed-in providers can be an array of Type, Provider,
or a recursive array of more providers.
class ParentProvider {}
class ChildProvider {}
var parent = Injector.resolveAndCreate([ParentProvider]);
var child = parent.resolveAndCreateChild([ChildProvider]);
expect(child.get(ParentProvider) instanceof ParentProvider).toBe(true);
expect(child.get(ChildProvider) instanceof ChildProvider).toBe(true);
expect(child.get(ParentProvider)).toBe(parent.get(ParentProvider));
This function is slower than the corresponding createChildFromResolved
because it needs to resolve the passed-in providers first.
See {@link Injector#resolve} and {@link Injector#createChildFromResolved}.
Creates an injector from previously resolved providers.
This API is the recommended way to construct injectors in performance-sensitive parts.
```typescript
Turns an array of provider definitions into an array of resolved providers.
A resolution is a process of flattening multiple nested arrays and converting individual providers into an array of ResolvedProviders.
```typescript
Used to provide dependencies that cannot be easily expressed as providers.
A unique object used for retrieving items from the Injector.
Keys have:
id.token.Key is used internally by Injector because its system-wide unique id allows the
injector to store created objects in a more efficient way.
Key should not be created directly. Injector creates keys automatically when resolving
providers.
Private
Returns a stringified token.
Retrieves a Key for a token.
DependencyMetadata is used by the framework to extend DI.
This is internal to Angular and should not be used directly.
Specifies that an injector should retrieve a dependency from any injector until reaching the closest host.
In Angular, a component element is automatically declared as a host for all the injectors in its view.
In the following example App contains ParentCmp, which contains ChildDirective.
So ParentCmp is the host of ChildDirective.
ChildDirective depends on two services: HostService and OtherService.
HostService is defined at ParentCmp, and OtherService is defined at App.
```typescript class OtherService {} class HostService {}
A marker metadata that marks a class as available to Injector for creation.
```typescript
A parameter metadata that marks a dependency as optional. Injector provides null if
the dependency is not found.
```typescript class Engine {}
Specifies that an Injector should retrieve a dependency only from itself.
```typescript class Dependency { }
Specifies that the dependency resolution should start from the parent injector.
```typescript class Dependency { }
Creates a token that can be used in a DI Provider.
var t = new OpaqueToken("value");
var injector = Injector.resolveAndCreate([
provide(t, {useValue: "bindingValue"})
]);
expect(injector.get(t)).toEqual("bindingValue");
Using an OpaqueToken is preferable to using strings as tokens because of possible collisions
caused by multiple providers using the same string as two different tokens.
Using an OpaqueToken is preferable to using an Object as tokens because it provides better
error messages.
See Provider instead.
Specifies a set of dependencies
(as tokens) which should be injected into the factory function.
var injector = Injector.resolveAndCreate([
new Provider(Number, { useFactory: () => { return 1+2; }}),
new Provider(String, { useFactory: (value) => { return "Value: " + value; },
deps: [Number] })
]);
expect(injector.get(Number)).toEqual(3);
expect(injector.get(String)).toEqual('Value: 3');
Used in conjunction with useFactory.
Token used when retrieving this provider. Usually, it is a type Type.
Binds a DI token to an implementation class.
Because useExisting and useClass are often confused, the example contains
both use cases for easy comparison.
class Vehicle {}
class Car extends Vehicle {}
var injectorClass = Injector.resolveAndCreate([
Car,
new Provider(Vehicle, { useClass: Car })
]);
var injectorAlias = Injector.resolveAndCreate([
Car,
new Provider(Vehicle, { useExisting: Car })
]);
expect(injectorClass.get(Vehicle)).not.toBe(injectorClass.get(Car));
expect(injectorClass.get(Vehicle) instanceof Car).toBe(true);
expect(injectorAlias.get(Vehicle)).toBe(injectorAlias.get(Car));
expect(injectorAlias.get(Vehicle) instanceof Car).toBe(true);
Binds a DI token to an existing token.
Injector returns the same instance as if the provided token was used.
This is in contrast to useClass where a separate instance of useClass is returned.
Because useExisting and useClass are often confused the example contains
both use cases for easy comparison.
class Vehicle {}
class Car extends Vehicle {}
var injectorAlias = Injector.resolveAndCreate([
Car,
new Provider(Vehicle, { useExisting: Car })
]);
var injectorClass = Injector.resolveAndCreate([
Car,
new Provider(Vehicle, { useClass: Car })
]);
expect(injectorAlias.get(Vehicle)).toBe(injectorAlias.get(Car));
expect(injectorAlias.get(Vehicle) instanceof Car).toBe(true);
expect(injectorClass.get(Vehicle)).not.toBe(injectorClass.get(Car));
expect(injectorClass.get(Vehicle) instanceof Car).toBe(true);
Binds a DI token to a function which computes the value.
var injector = Injector.resolveAndCreate([
new Provider(Number, { useFactory: () => { return 1+2; }}),
new Provider(String, { useFactory: (value) => { return "Value: " + value; },
deps: [Number] })
]);
expect(injector.get(Number)).toEqual(3);
expect(injector.get(String)).toEqual('Value: 3');
Used in conjunction with dependencies.
Binds a DI token to a value.
var injector = Injector.resolveAndCreate([
new Provider("message", { useValue: 'Hello' })
]);
expect(injector.get("message")).toEqual('Hello');
Creates multiple providers matching the same token (a multi-provider).
Multi-providers are used for creating pluggable service, where the system comes with some default providers, and the user can register additional providers. The combination of the default providers and the additional providers will be used to drive the behavior of the system.
var injector = Injector.resolveAndCreate([
new Provider("Strings", { useValue: "String1", multi: true}),
new Provider("Strings", { useValue: "String2", multi: true})
]);
expect(injector.get("Strings")).toEqual(["String1", "String2"]);
Multi-providers and regular providers cannot be mixed. The following will throw an exception:
var injector = Injector.resolveAndCreate([
new Provider("Strings", { useValue: "String1", multi: true }),
new Provider("Strings", { useValue: "String2"})
]);
Dependency is used by the framework to extend DI.
This is internal to Angular and should not be used directly.
Describes how the Injector should instantiate a given token.
See provide.
var injector = Injector.resolveAndCreate([
new Provider("message", { useValue: 'Hello' })
]);
expect(injector.get("message")).toEqual('Hello');
Specifies a set of dependencies
(as tokens) which should be injected into the factory function.
var injector = Injector.resolveAndCreate([
new Provider(Number, { useFactory: () => { return 1+2; }}),
new Provider(String, { useFactory: (value) => { return "Value: " + value; },
deps: [Number] })
]);
expect(injector.get(Number)).toEqual(3);
expect(injector.get(String)).toEqual('Value: 3');
Used in conjunction with useFactory.
Token used when retrieving this provider. Usually, it is a type Type.
Binds a DI token to an implementation class.
Because useExisting and useClass are often confused, the example contains
both use cases for easy comparison.
class Vehicle {}
class Car extends Vehicle {}
var injectorClass = Injector.resolveAndCreate([
Car,
new Provider(Vehicle, { useClass: Car })
]);
var injectorAlias = Injector.resolveAndCreate([
Car,
new Provider(Vehicle, { useExisting: Car })
]);
expect(injectorClass.get(Vehicle)).not.toBe(injectorClass.get(Car));
expect(injectorClass.get(Vehicle) instanceof Car).toBe(true);
expect(injectorAlias.get(Vehicle)).toBe(injectorAlias.get(Car));
expect(injectorAlias.get(Vehicle) instanceof Car).toBe(true);
Binds a DI token to an existing token.
Injector returns the same instance as if the provided token was used.
This is in contrast to useClass where a separate instance of useClass is returned.
Because useExisting and useClass are often confused the example contains
both use cases for easy comparison.
class Vehicle {}
class Car extends Vehicle {}
var injectorAlias = Injector.resolveAndCreate([
Car,
new Provider(Vehicle, { useExisting: Car })
]);
var injectorClass = Injector.resolveAndCreate([
Car,
new Provider(Vehicle, { useClass: Car })
]);
expect(injectorAlias.get(Vehicle)).toBe(injectorAlias.get(Car));
expect(injectorAlias.get(Vehicle) instanceof Car).toBe(true);
expect(injectorClass.get(Vehicle)).not.toBe(injectorClass.get(Car));
expect(injectorClass.get(Vehicle) instanceof Car).toBe(true);
Binds a DI token to a function which computes the value.
var injector = Injector.resolveAndCreate([
new Provider(Number, { useFactory: () => { return 1+2; }}),
new Provider(String, { useFactory: (value) => { return "Value: " + value; },
deps: [Number] })
]);
expect(injector.get(Number)).toEqual(3);
expect(injector.get(String)).toEqual('Value: 3');
Used in conjunction with dependencies.
Binds a DI token to a value.
var injector = Injector.resolveAndCreate([
new Provider("message", { useValue: 'Hello' })
]);
expect(injector.get("message")).toEqual('Hello');
Creates multiple providers matching the same token (a multi-provider).
Multi-providers are used for creating pluggable service, where the system comes with some default providers, and the user can register additional providers. The combination of the default providers and the additional providers will be used to drive the behavior of the system.
var injector = Injector.resolveAndCreate([
new Provider("Strings", { useValue: "String1", multi: true}),
new Provider("Strings", { useValue: "String2", multi: true})
]);
expect(injector.get("Strings")).toEqual(["String1", "String2"]);
Multi-providers and regular providers cannot be mixed. The following will throw an exception:
var injector = Injector.resolveAndCreate([
new Provider("Strings", { useValue: "String1", multi: true }),
new Provider("Strings", { useValue: "String2"})
]);
Helper class for the bind function.
Binds a DI token to an existing token.
Angular will return the same instance as if the provided token was used. (This is
in contrast to useClass where a separate instance of useClass will be returned.)
Because toAlias and toClass are often confused, the example contains
both use cases for easy comparison.
class Vehicle {}
class Car extends Vehicle {}
var injectorAlias = Injector.resolveAndCreate([
Car,
provide(Vehicle, {useExisting: Car})
]);
var injectorClass = Injector.resolveAndCreate([
Car,
provide(Vehicle, {useClass: Car})
]);
expect(injectorAlias.get(Vehicle)).toBe(injectorAlias.get(Car));
expect(injectorAlias.get(Vehicle) instanceof Car).toBe(true);
expect(injectorClass.get(Vehicle)).not.toBe(injectorClass.get(Car));
expect(injectorClass.get(Vehicle) instanceof Car).toBe(true);
Binds a DI token to a class.
Because toAlias and toClass are often confused, the example contains
both use cases for easy comparison.
class Vehicle {}
class Car extends Vehicle {}
var injectorClass = Injector.resolveAndCreate([
Car,
provide(Vehicle, {useClass: Car})
]);
var injectorAlias = Injector.resolveAndCreate([
Car,
provide(Vehicle, {useExisting: Car})
]);
expect(injectorClass.get(Vehicle)).not.toBe(injectorClass.get(Car));
expect(injectorClass.get(Vehicle) instanceof Car).toBe(true);
expect(injectorAlias.get(Vehicle)).toBe(injectorAlias.get(Car));
expect(injectorAlias.get(Vehicle) instanceof Car).toBe(true);
Binds a DI token to a function which computes the value.
var injector = Injector.resolveAndCreate([
provide(Number, {useFactory: () => { return 1+2; }}),
provide(String, {useFactory: (v) => { return "Value: " + v; }, deps: [Number]})
]);
expect(injector.get(Number)).toEqual(3);
expect(injector.get(String)).toEqual('Value: 3');
An internal resolved representation of a factory function created by resolving Provider.
Arguments (dependencies) to the factory function.
Factory function which can return an instance of an object represented by a key.
See ResolvedProvider instead.
A key, usually a Type.
Indicates if the provider is a multi-provider or a regular provider.
Factory function which can return an instance of an object represented by a key.
It is usually created automatically by Injector.resolveAndCreate.
It can be created manually, as follows:
var resolvedProviders = Injector.resolve([new Provider('message', {useValue: 'Hello'})]);
var injector = Injector.fromResolvedProviders(resolvedProviders);
expect(injector.get('message')).toEqual('Hello');
A key, usually a Type.
Indicates if the provider is a multi-provider or a regular provider.
Factory function which can return an instance of an object represented by a key.
Creates a Provider.
To construct a Provider, bind a token to either a class, a value, a factory function,
or
to an existing token.
See ProviderBuilder for more details.
The token is most commonly a class or {@link angular2/di/OpaqueToken}.
Merges a list of ResolvedProviders into a list where each key is contained exactly once and multi providers have been merged.
Resolve a single provider.
Converts the Provider into ResolvedProvider.
Injector internally only uses ResolvedProvider, Provider contains convenience provider syntax.
Resolve a list of Providers.
Low-level service for compiling {@link Component}s into {@link ProtoViewRef ProtoViews}s, which can later be used to create and render a Component instance.
Most applications should instead use higher-level DynamicComponentLoader service, which both compiles and instantiates a Component.
Return DirectiveMetadata for a given Type.
Represents an instance of a Component created via DynamicComponentLoader.
ComponentRef provides access to the Component Instance as well other objects related to this
Component Instance and allows you to destroy the Component Instance via the {@link #dispose}
method.
The user defined component type, represented via the constructor function.
The injector provided {@link DynamicComponentLoader#loadAsRoot}.
TODO(i): this api is useless and should be replaced by an injector retrieved from the HostElementRef, which is currently not possible.
The instance of the Component.
Location of the Host Element of this Component Instance.
The ViewRef of the Host View of this Component instance.
Destroys the component instance and all of the data structures associated with it.
TODO(i): rename to destroy to be consistent with AppViewManager and ViewContainerRef
TODO(i): refactor into public/private fields
The user defined component type, represented via the constructor function.
The injector provided {@link DynamicComponentLoader#loadAsRoot}.
TODO(i): this api is useless and should be replaced by an injector retrieved from the HostElementRef, which is currently not possible.
The instance of the Component.
Location of the Host Element of this Component Instance.
The ViewRef of the Host View of this Component instance.
Service for instantiating a Component and attaching it to a View at a specified location.
Creates an instance of a Component type and attaches it to the first element in the
platform-specific global view that matches the component's selector.
In a browser the platform-specific global view is the main DOM Document.
If needed, the component's selector can be overridden via overrideSelector.
You can optionally provide injector and this Injector will be used to instantiate the
Component.
To be notified when this Component instance is destroyed, you can also optionally provide
onDispose callback.
Returns a promise for the ComponentRef representing the newly created Component.
```
Creates an instance of a Component and attaches it to a View Container located inside of the Component View of another Component instance.
The targeted Component Instance is specified via its hostLocation ElementRef. The
location within the Component View of this Component Instance is specified via anchorName
Template Variable Name.
You can optionally provide providers to configure the Injector provisioned for this
Component Instance.
Returns a promise for the ComponentRef representing the newly created Component.
```
Creates an instance of a Component and attaches it to the View Container found at the
location specified as ElementRef.
You can optionally provide providers to configure the Injector provisioned for this
Component Instance.
Returns a promise for the ComponentRef representing the newly created Component.
```
Strategy used by the ElementInjector when the number of bindings is 11 or more.
In such a case, there are too many fields to inline (see ElementInjectorInlineStrategy).
Strategy used by the ElementInjector when the number of providers is 10 or less.
In such a case, inlining fields is beneficial for performances.
Represents a location in a View that has an injection, change-detection and render context associated with it.
An ElementRef is created for each element in the Template that contains a Directive, Component
or data-binding.
An ElementRef is backed by a render-specific element. In the browser, this is usually a DOM
element.
The underlying native element or null if direct access to native elements is not supported
(e.g. when the application runs in a web worker).
Use this API as the last resort when direct access to DOM is needed. Use templating and data-binding provided by Angular instead. Alternatively you take a look at Renderer which provides API that can safely be used even when direct access to native elements is not supported.
Relying on direct DOM access creates tight coupling between your application and rendering layers which will make it impossible to separate the two and deploy your application into a web worker.
Implement this interface to get notified after every check of your directive's content.
```typescript
Implement this interface to get notified when your directive's content has been fully initialized.
```typescript
Implement this interface to get notified after every check of your component's view.
```typescript
Implement this interface to get notified when your component's view has been fully initialized.
```typescript
Implement this interface to override the default change detection algorithm for your directive.
ngDoCheck gets called to check the changes in the directives instead of the default algorithm.
The default change detection algorithm looks for differences by comparing bound-property values
by reference across change detection runs. When DoCheck is implemented, the default algorithm
is disabled and ngDoCheck is responsible for checking for changes.
Implementing this interface allows improving performance by using insights about the component, its implementation and data types of its properties.
Note that a directive should not implement both DoCheck and OnChanges at the same time.
ngOnChanges would not be called when a directive implements DoCheck. Reaction to the changes
have to be handled from within the ngDoCheck callback.
Use KeyValueDiffers and IterableDiffers to add your custom check mechanisms.
In the following example ngDoCheck uses an IterableDiffers to detect the updates to the
array list:
```typescript
Implement this interface to get notified when any data-bound property of your directive changes.
ngOnChanges is called right after the data-bound properties have been checked and before view
and content children are checked if at least one of them has changed.
The changes parameter contains an entry for each of the changed data-bound property. The key is
the property name and the value is an instance of SimpleChange.
```typescript
Implement this interface to get notified when your directive is destroyed.
ngOnDestroy callback is typically used for any custom cleanup that needs to occur when the
instance is destroyed
```typesript
Implement this interface to execute custom initialization logic after your directive's data-bound properties have been initialized.
ngOnInit is called right after the directive's data-bound properties have been checked for the
first time, and before any of its children have been checked. It is invoked only once when the
directive is instantiated.
```typescript
Resolve a Type for PipeMetadata.
This interface can be overridden by the application developer to create custom behavior.
See Compiler
Return PipeMetadata for a given Type.
An unmodifiable list of items that Angular keeps up to date when the state of the application changes.
The type of object that QueryMetadata and ViewQueryMetadata provide.
Implements an iterable interface, therefore it can be used in both ES6
javascript for (var i of items) loops as well as in Angular templates with
*ngFor="#i of myList".
Changes can be observed by subscribing to the changes Observable.
NOTE: In the future this class will implement an Observable interface.
```typescript
returns a filtered array.
executes function for each element in a query.
returns a new array with the passed in function applied to each element.
returns a reduced value.
converts QueryList into an array
Represents an Embedded Template that can be used to instantiate Embedded Views.
You can access a TemplateRef, in two ways. Via a directive placed on a <template> element (or
directive prefixed with *) and have the TemplateRef for this Embedded View injected into the
constructor of the directive using the TemplateRef Token. Alternatively you can query for the
TemplateRef from a Component or a Directive via Query.
To instantiate Embedded Views based on a Template, use {@link ViewContainerRef#createEmbeddedView}, which will create the View and attach it to the View Container.
The location in the View where the Embedded View logically belongs to.
The data-binding and injection contexts of Embedded Views created from this TemplateRef
inherit from the contexts of this location.
Typically new Embedded Views are attached to the View Container of this location, but in advanced use-cases, the View can be attached to a different container while keeping the data-binding and injection context from the original location.
Cost of making objects: http://jsperf.com/instantiate-size-of-object
The context against which data-binding expressions in this view are evaluated against. This is always a component instance.
Whether root injectors of this view have a hostBoundary.
Variables, local to this view, that can be used in binding expressions (in addition to the
context). This is used for thing like <video #player> or
<li template="for #item of items">, where "player" and "item" are locals, respectively.
Triggers the event handlers for the element and the directives.
This method is intended to be called from directive EventEmitters.
false if preventDefault must be applied to the DOM event
Represents a container where one or more Views can be attached.
The container can contain two kinds of Views. Host Views, created by instantiating a {@link Component} via {@link #createHostView}, and Embedded Views, created by instantiating an Embedded Template via {@link #createEmbeddedView}.
The location of the View Container within the containing View is specified by the Anchor
element. Each View Container can have only one Anchor Element and each Anchor Element can only
have a single View Container.
Root elements of Views attached to this container become siblings of the Anchor Element in the Rendered View.
To access a ViewContainerRef of an Element, you can either place a Directive injected
with ViewContainerRef on the Element, or you obtain it via
{@link AppViewManager#getViewContainer}.
Anchor element that specifies the location of this container in the containing View.
Returns the number of Views currently attached to this container.
Destroys all Views in this container.
Instantiates an Embedded View based on the templateRef and inserts it
into this container at the specified index.
If index is not specified, the new View will be inserted as the last View in the container.
Returns the ViewRef for the newly created View.
Instantiates a single {@link Component} and inserts its Host View into this container at the
specified index.
The component is instantiated using its {@link ProtoViewRef protoView} which can be
obtained via {@link Compiler#compileInHost}.
If index is not specified, the new View will be inserted as the last View in the container.
You can optionally specify dynamicallyCreatedProviders, which configure the Injector
that will be created for the Host View.
Returns the HostViewRef of the Host View created for the newly instantiated Component.
Use along with {@link #insert} to move a View within the current container.
If the index param is omitted, the last ViewRef is detached.
Inserts a View identified by a ViewRef into the container at the specified index.
If index is not specified, the new View will be inserted as the last View in the container.
Returns the inserted ViewRef.
Destroys a View attached to this container at the specified index.
If index is not specified, the last View in the container will be removed.
Destroys all Views in this container.
Service exposing low level API for creating, moving and destroying Views.
Most applications should use higher-level abstractions like DynamicComponentLoader and ViewContainerRef instead.
See {@link AppViewManager#detachViewInContainer}.
Instantiates an Embedded View based on the templateRef and inserts it
into the View Container specified via viewContainerLocation at the specified index.
Returns the ViewRef for the newly created View.
This as a low-level way to create and attach an Embedded via to a View Container. Most applications should used {@link ViewContainerRef#createEmbeddedView} instead.
Use {@link AppViewManager#destroyViewInContainer} to destroy the created Embedded View.
Instantiates a single {@link Component} and inserts its Host View into the View Container
found at viewContainerLocation. Within the container, the view will be inserted at position
specified via index.
The component is instantiated using its {@link ProtoViewRef protoViewRef} which can be
obtained via {@link Compiler#compileInHost}.
You can optionally specify dynamicallyCreatedProviders, which configure the Injector
that will be created for the Host View.
Returns the HostViewRef of the Host View created for the newly instantiated Component.
Use {@link AppViewManager#destroyViewInContainer} to destroy the created Host View.
Creates an instance of a Component and attaches it to the first element in the global View
(usually DOM Document) that matches the component's selector or overrideSelector.
This as a low-level way to bootstrap an application and upgrade an existing Element to a Host Element. Most applications should use {@link DynamicComponentLoader#loadAsRoot} instead.
The Component and its View are created based on the hostProtoComponentRef which can be
obtained
by compiling the component with {@link Compiler#compileInHost}.
Use {@link AppViewManager#destroyRootHostView} to destroy the created Component and it's Host View.
```
Destroys the Host View created via {@link AppViewManager#createRootHostView}.
Along with the Host View, the Component Instance as well as all nested View and Components are destroyed as well.
Destroys an Embedded or Host View attached to a View Container at the specified index.
The View Container is located via viewContainerLocation.
See {@link AppViewManager#attachViewInContainer}.
Returns the component instance for the provided Host Element.
Returns the ElementRef that makes up the specified Host View.
Searches the Component View of the Component specified via hostLocation and returns the
ElementRef for the Element identified via a Variable Name variableName.
Throws an exception if the specified hostLocation is not a Host Element of a Component, or if
variable variableName couldn't be found in the Component View of this Component.
Returns a ViewContainerRef of the View Container at the specified location.
Represents an Angular View.
A View is a fundamental building block of the application UI. It is the smallest grouping of Elements which are created and destroyed together.
Properties of elements in a View can change, but the structure (number and order) of elements in a View cannot. Changing the structure of Elements can only be done by inserting, moving or removing nested Views via a ViewContainerRef. Each View can contain many View Containers.
Given this template...
Count: {{items.length}}
<ul>
<li *ngFor="var item of items">{{item}}</li>
</ul>
... we have two {@link ProtoViewRef}s:
Outer {@link ProtoViewRef}:
Count: {{items.length}}
<ul>
<template ngFor var-item [ngForOf]="items"></template>
</ul>
Inner {@link ProtoViewRef}:
<li>{{item}}</li>
Notice that the original template is broken down into two separate {@link ProtoViewRef}s.
The outer/inner {@link ProtoViewRef}s are then assembled into views like so:
<!-- ViewRef: outer-0 -->
Count: 2
<ul>
<template view-container-ref></template>
<!-- ViewRef: inner-1 --><li>first</li><!-- /ViewRef: inner-1 -->
<!-- ViewRef: inner-2 --><li>second</li><!-- /ViewRef: inner-2 -->
</ul>
<!-- /ViewRef: outer-0 -->
Checks whether this view has a local variable called variableName.
Sets value of local variable called variableName in this View.
Represents a View containing a single Element that is the Host Element of a {@link Component} instance.
A Host View is created for every dynamically created Component that was compiled on its own (as opposed to as a part of another Component's Template) via {@link Compiler#compileInHost} or one of the higher-level APIs: {@link AppViewManager#createRootHostView}, {@link AppViewManager#createHostViewInContainer}, {@link ViewContainerRef#createHostView}.
Return ChangeDetectorRef
Resolves types to ViewMetadata.
AttributeMetadata factory for creating annotations, decorators or DSL.
{@example core/ts/metadata/metadata.ts region='attributeFactory'}
var MyComponent = ng
.Component({...})
.Class({
constructor: [new ng.Attribute('title'), function(title) {
...
}]
})
var MyComponent = function(title) {
...
};
MyComponent.annotations = [
new ng.Component({...})
]
MyComponent.parameters = [
[new ng.Attribute('title')]
]
Invoke as ES7 decorator.
See ComponentFactory.
Interface for the ComponentMetadata decorator function.
See ComponentFactory.
Storage for the accumulated annotations so far used by the DSL syntax.
Used by Class to annotate the generated class.
Generate a class from the definition and annotate it with {@link TypeDecorator#annotations}.
Chain ViewMetadata annotation.
ComponentMetadata factory for creating annotations, decorators or DSL.
{@example core/ts/metadata/metadata.ts region='component'}
var MyComponent = ng
.Component({...})
.Class({
constructor: function() {
...
}
})
var MyComponent = function() {
...
};
MyComponent.annotations = [
new ng.Component({...})
]
Factory for ContentChild.
Factory for ContentChildren.
Invoke as ES7 decorator.
See DirectiveFactory.
Interface for the DirectiveMetadata decorator function.
See DirectiveFactory.
Storage for the accumulated annotations so far used by the DSL syntax.
Used by Class to annotate the generated class.
Generate a class from the definition and annotate it with {@link TypeDecorator#annotations}.
DirectiveMetadata factory for creating annotations, decorators or DSL.
{@example core/ts/metadata/metadata.ts region='directive'}
var MyDirective = ng
.Directive({...})
.Class({
constructor: function() {
...
}
})
var MyDirective = function() {
...
};
MyDirective.annotations = [
new ng.Directive({...})
]
HostBindingMetadata factory function.
HostListenerMetadata factory function.
InputMetadata factory for creating decorators.
See InputMetadata.
OutputMetadata factory for creating decorators.
See OutputMetadata.
PipeMetadata factory for creating decorators.
{@example core/ts/metadata/metadata.ts region='pipe'}
QueryMetadata factory for creating annotations, decorators or DSL.
``` import {Query, QueryList, Component} from "angular2/core";
Factory for ViewChild.
Factory for ViewChildren.
Invoke as ES7 decorator.
See ViewFactory.
Interface for the ViewMetadata decorator function.
See ViewFactory.
Storage for the accumulated annotations so far used by the DSL syntax.
Used by Class to annotate the generated class.
Generate a class from the definition and annotate it with {@link TypeDecorator#annotations}.
Chain ViewMetadata annotation.
ViewMetadata factory for creating annotations, decorators or DSL.
``` import {Component, View} from "angular2/core";
Specifies that a constant attribute value should be injected.
The directive can inject constant string literals of host element attributes.
Suppose we have an <input> element and want to know its type.
<input type="text">
A decorator can inject string literal text like so:
{@example core/ts/metadata/metadata.ts region='attributeMetadata'}
Declare reusable UI building blocks for an application.
Each Angular component requires a single @Component annotation. The @Component
annotation specifies when a component is instantiated, and which properties and hostListeners it
binds to.
When a component is instantiated, Angular
providers and viewProviders.All template expressions and statements are then evaluated against the component instance.
When the component class implements some {@link angular2/lifecycle_hooks} the callbacks are called by the change detection at defined points in time during the life of the component.
{@example core/ts/metadata/metadata.ts region='component'}
Configures a content query.
Content queries are set before the ngAfterContentInit callback is called.
```
Configures a content query.
Content queries are set before the ngAfterContentInit callback is called.
```
Directives allow you to attach behavior to elements in the DOM.
DirectiveMetadatas with an embedded view are called ComponentMetadatas.
A directive consists of a single directive annotation and a controller class. When the
directive's selector matches
elements in the DOM, the following steps occur:
ElementInjector attempts to resolve the directive's constructor
arguments.ElementInjector in a
depth-first order,
as declared in the HTML.There are three stages of injection resolution.
@Optional, returns null.ElementInjector
which follow the same parent-child hierarchy as the DOM elements themselves.When a template is instantiated, it also must instantiate the corresponding directives in a
depth-first order. The
current ElementInjector resolves the constructor dependencies for each directive.
Angular then resolves dependencies as follows, according to the order in which they appear in the ViewMetadata:
The ElementInjector can inject other directives, element-specific special objects, or it can
delegate to the parent
injector.
To inject other directives, declare the constructor parameter as:
directive:DirectiveType: a directive on the current element only@Host() directive:DirectiveType: any directive that matches the type between the current
element and the
Shadow DOM root.@Query(DirectiveType) query:QueryList<DirectiveType>: A live collection of direct child
directives.@QueryDescendants(DirectiveType) query:QueryList<DirectiveType>: A live collection of any
child directives.To inject element-specific special objects, declare the constructor parameter as:
element: ElementRef to obtain a reference to logical element in the view.viewContainer: ViewContainerRef to control child template instantiation, for
DirectiveMetadata directives onlybindingPropagation: BindingPropagation to control change detection in a more granular way.The following example demonstrates how dependency injection resolves constructor arguments in practice.
Assume this HTML template:
<div dependency="1">
<div dependency="2">
<div dependency="3" my-directive>
<div dependency="4">
<div dependency="5"></div>
</div>
<div dependency="6"></div>
</div>
</div>
</div>
With the following dependency decorator and SomeService injectable class.
```
Declares a host property binding.
Angular automatically checks host property bindings during change detection. If a binding changes, it will update the host element of the directive.
HostBindingMetadata takes an optional parameter that specifies the property
name of the host element that will be updated. When not provided,
the class property name is used.
The following example creates a directive that sets the valid and invalid classes
on the DOM element that has ngModel directive on it.
```typescript
Declares a host listener.
Angular will invoke the decorated method when the host element emits the specified event.
If the decorated method returns false, then preventDefault is applied on the DOM
event.
The following example declares a directive that attaches a click listener to the button and counts clicks.
```typescript
Declares a data-bound input property.
Angular automatically updates data-bound properties during change detection.
InputMetadata takes an optional parameter that specifies the name
used when instantiating a component in the template. When not provided,
the name of the decorated property is used.
The following example creates a component with two input properties.
```typescript
Declares an event-bound output property.
When an output property emits an event, an event handler attached to that event the template is invoked.
OutputMetadata takes an optional parameter that specifies the name
used when instantiating a component in the template. When not provided,
the name of the decorated property is used.
```typescript
Declare reusable pipe function.
{@example core/ts/metadata/metadata.ts region='pipe'}
Declares an injectable parameter to be a live list of directives or variable bindings from the content children of a directive.
Assume that <tabs> component would like to get a list its children <pane>
components as shown in this example:
<tabs>
<pane title="Overview">...</pane>
<pane *ngFor="#o of objects" [title]="o.title">{{o.text}}</pane>
</tabs>
The preferred solution is to query for Pane directives using this decorator.
```javascript
Metadata properties available for configuring Views.
Each Angular component requires a single @Component and at least one @View annotation. The
@View annotation specifies the HTML template to use, and lists the directives that are active
within the template.
When a component is instantiated, the template is loaded into the component's shadow root, and the expressions and statements in the template are evaluated against the component.
For details on the @Component annotation, see ComponentMetadata.
```
Configures a view query.
View queries are set before the ngAfterViewInit callback is called.
```
Configures a view query.
View queries are set before the ngAfterViewInit callback is called.
```
Similar to QueryMetadata, but querying the component view, instead of the content children.
```javascript
Specifies that a constant attribute value should be injected.
The directive can inject constant string literals of host element attributes.
Suppose we have an <input> element and want to know its type.
<input type="text">
A decorator can inject string literal text like so:
{@example core/ts/metadata/metadata.ts region='attributeMetadata'}
Configures a content query.
Content queries are set before the ngAfterContentInit callback is called.
```
whether we want to query only direct children (false) or all children (true).
whether this is querying for a variable binding or a directive.
always false to differentiate it with ViewQueryMetadata.
what this is querying for.
returns a list of variable bindings this is querying for. Only applicable if this is a variable bindings query.
Configures a content query.
Content queries are set before the ngAfterContentInit callback is called.
```
whether we want to query only direct children (false) or all children (true).
whether this is querying for a variable binding or a directive.
always false to differentiate it with ViewQueryMetadata.
what this is querying for.
returns a list of variable bindings this is querying for. Only applicable if this is a variable bindings query.
Declares an injectable parameter to be a live list of directives or variable bindings from the content children of a directive.
Assume that <tabs> component would like to get a list its children <pane>
components as shown in this example:
<tabs>
<pane title="Overview">...</pane>
<pane *ngFor="#o of objects" [title]="o.title">{{o.text}}</pane>
</tabs>
The preferred solution is to query for Pane directives using this decorator.
```javascript
whether we want to query only direct children (false) or all children (true).
whether this is querying for a variable binding or a directive.
always false to differentiate it with ViewQueryMetadata.
what this is querying for.
returns a list of variable bindings this is querying for. Only applicable if this is a variable bindings query.
Configures a view query.
View queries are set before the ngAfterViewInit callback is called.
```
whether we want to query only direct children (false) or all children (true).
whether this is querying for a variable binding or a directive.
always true to differentiate it with QueryMetadata.
what this is querying for.
returns a list of variable bindings this is querying for. Only applicable if this is a variable bindings query.
Configures a view query.
View queries are set before the ngAfterViewInit callback is called.
```
whether we want to query only direct children (false) or all children (true).
whether this is querying for a variable binding or a directive.
always true to differentiate it with QueryMetadata.
what this is querying for.
returns a list of variable bindings this is querying for. Only applicable if this is a variable bindings query.
Similar to QueryMetadata, but querying the component view, instead of the content children.
```javascript
whether we want to query only direct children (false) or all children (true).
whether this is querying for a variable binding or a directive.
always true to differentiate it with QueryMetadata.
what this is querying for.
returns a list of variable bindings this is querying for. Only applicable if this is a variable bindings query.
Declare reusable UI building blocks for an application.
Each Angular component requires a single @Component annotation. The
@Component
annotation specifies when a component is instantiated, and which properties and hostListeners it
binds to.
When a component is instantiated, Angular
providers and viewProviders.All template expressions and statements are then evaluated against the component instance.
For details on the @View annotation, see ViewMetadata.
When the component class implements some {@link angular2/lifecycle_hooks} the callbacks are called by the change detection at defined points in time during the life of the component.
{@example core/ts/metadata/metadata.ts region='component'}
Defines the used change detection strategy.
When a component is instantiated, Angular creates a change detector, which is responsible for propagating the component's bindings.
The changeDetection property defines, whether the change detection will be checked every time
or only when the component tells it to do so.
Defines the name that can be used in the template to assign this directive to a variable.
```
Specify the events, actions, properties and attributes related to the host element.
Specifies which DOM events a directive listens to via a set of (event) to method
key-value pairs:
event: the DOM event that the directive listens to.statement: the statement to execute when the event occurs.
If the evaluation of the statement returns false, then preventDefaultis applied on the DOM
event.To listen to global events, a target must be added to the event name.
The target can be window, document or body.
When writing a directive event binding, you can also refer to the $event local variable.
The following example declares a directive that attaches a click listener to the button and counts clicks.
```typescript
The module id of the module that contains the component.
Needed to be able to resolve relative urls for templates and styles.
In Dart, this can be determined automatically and does not need to be set.
In CommonJS, this can always be set to module.id.
```
Configures the queries that will be injected into the directive.
Content queries are set before the ngAfterContentInit callback is called.
View queries are set before the ngAfterViewInit callback is called.
```
The CSS selector that triggers the instantiation of a directive.
Angular only allows directives to trigger on CSS selectors that do not cross element boundaries.
selector may be declared as one of the following:
element-name: select by element name..class: select by class name.[attribute]: select by attribute name.[attribute=value]: select by attribute name and value.:not(sub_selector): select only if the element does not match the sub_selector.selector1, selector2: select if either selector1 or selector2 matches.Suppose we have a directive with an input[type=text] selector.
And the following HTML:
<form>
<input type="text">
<input type="radio">
<form>
The directive would only be instantiated on the <input type="text"> element.
Enumerates the set of data-bound input properties for a directive
Angular automatically updates input properties during change detection.
The inputs property defines a set of directiveProperty to bindingProperty
configuration:
directiveProperty specifies the component property where the value is written.bindingProperty specifies the DOM property where the value is read from.When bindingProperty is not provided, it is assumed to be equal to directiveProperty.
The following example creates a component with two data-bound properties.
```typescript
Enumerates the set of event-bound output properties.
When an output property emits an event, an event handler attached to that event the template is invoked.
The outputs property defines a set of directiveProperty to bindingProperty
configuration:
directiveProperty specifies the component property that emits events.bindingProperty specifies the DOM property the event handler is attached to.```typescript
Defines the set of injectable objects that are visible to a Directive and its light DOM children.
Here is an example of a class that can be injected:
``` class Greeter { greet(name:string) { return 'Hello ' + name + '!'; } }
Defines the set of injectable objects that are visible to its view DOM children.
Here is an example of a class that can be injected:
``` class Greeter { greet(name:string) { return 'Hello ' + name + '!'; } }
Directives allow you to attach behavior to elements in the DOM.
DirectiveMetadatas with an embedded view are called ComponentMetadatas.
A directive consists of a single directive annotation and a controller class. When the
directive's selector matches
elements in the DOM, the following steps occur:
ElementInjector attempts to resolve the directive's constructor
arguments.ElementInjector in a
depth-first order,
as declared in the HTML.There are three stages of injection resolution.
@Optional, returns null.ElementInjector
which follow the same parent-child hierarchy as the DOM elements themselves.When a template is instantiated, it also must instantiate the corresponding directives in a
depth-first order. The
current ElementInjector resolves the constructor dependencies for each directive.
Angular then resolves dependencies as follows, according to the order in which they appear in the ViewMetadata:
The ElementInjector can inject other directives, element-specific special objects, or it can
delegate to the parent
injector.
To inject other directives, declare the constructor parameter as:
directive:DirectiveType: a directive on the current element only@Host() directive:DirectiveType: any directive that matches the type between the current
element and the
Shadow DOM root.@Query(DirectiveType) query:QueryList<DirectiveType>: A live collection of direct child
directives.@QueryDescendants(DirectiveType) query:QueryList<DirectiveType>: A live collection of any
child directives.To inject element-specific special objects, declare the constructor parameter as:
element: ElementRef to obtain a reference to logical element in the view.viewContainer: ViewContainerRef to control child template instantiation, for
DirectiveMetadata directives onlybindingPropagation: BindingPropagation to control change detection in a more granular way.The following example demonstrates how dependency injection resolves constructor arguments in practice.
Assume this HTML template:
<div dependency="1">
<div dependency="2">
<div dependency="3" my-directive>
<div dependency="4">
<div dependency="5"></div>
</div>
<div dependency="6"></div>
</div>
</div>
</div>
With the following dependency decorator and SomeService injectable class.
```
Defines the name that can be used in the template to assign this directive to a variable.
```
Specify the events, actions, properties and attributes related to the host element.
Specifies which DOM events a directive listens to via a set of (event) to method
key-value pairs:
event: the DOM event that the directive listens to.statement: the statement to execute when the event occurs.
If the evaluation of the statement returns false, then preventDefaultis applied on the DOM
event.To listen to global events, a target must be added to the event name.
The target can be window, document or body.
When writing a directive event binding, you can also refer to the $event local variable.
The following example declares a directive that attaches a click listener to the button and counts clicks.
```typescript
Configures the queries that will be injected into the directive.
Content queries are set before the ngAfterContentInit callback is called.
View queries are set before the ngAfterViewInit callback is called.
```
The CSS selector that triggers the instantiation of a directive.
Angular only allows directives to trigger on CSS selectors that do not cross element boundaries.
selector may be declared as one of the following:
element-name: select by element name..class: select by class name.[attribute]: select by attribute name.[attribute=value]: select by attribute name and value.:not(sub_selector): select only if the element does not match the sub_selector.selector1, selector2: select if either selector1 or selector2 matches.Suppose we have a directive with an input[type=text] selector.
And the following HTML:
<form>
<input type="text">
<input type="radio">
<form>
The directive would only be instantiated on the <input type="text"> element.
Enumerates the set of data-bound input properties for a directive
Angular automatically updates input properties during change detection.
The inputs property defines a set of directiveProperty to bindingProperty
configuration:
directiveProperty specifies the component property where the value is written.bindingProperty specifies the DOM property where the value is read from.When bindingProperty is not provided, it is assumed to be equal to directiveProperty.
The following example creates a component with two data-bound properties.
```typescript
Enumerates the set of event-bound output properties.
When an output property emits an event, an event handler attached to that event the template is invoked.
The outputs property defines a set of directiveProperty to bindingProperty
configuration:
directiveProperty specifies the component property that emits events.bindingProperty specifies the DOM property the event handler is attached to.```typescript
Defines the set of injectable objects that are visible to a Directive and its light DOM children.
Here is an example of a class that can be injected:
``` class Greeter { greet(name:string) { return 'Hello ' + name + '!'; } }
Declares a host property binding.
Angular automatically checks host property bindings during change detection. If a binding changes, it will update the host element of the directive.
HostBindingMetadata takes an optional parameter that specifies the property
name of the host element that will be updated. When not provided,
the class property name is used.
The following example creates a directive that sets the valid and invalid classes
on the DOM element that has ngModel directive on it.
```typescript
Declares a host listener.
Angular will invoke the decorated method when the host element emits the specified event.
If the decorated method returns false, then preventDefault is applied on the DOM
event.
The following example declares a directive that attaches a click listener to the button and counts clicks.
```typescript
Declares a data-bound input property.
Angular automatically updates data-bound properties during change detection.
InputMetadata takes an optional parameter that specifies the name
used when instantiating a component in the template. When not provided,
the name of the decorated property is used.
The following example creates a component with two input properties.
```typescript
Name used when instantiating a component in the template.
Declares an event-bound output property.
When an output property emits an event, an event handler attached to that event the template is invoked.
OutputMetadata takes an optional parameter that specifies the name
used when instantiating a component in the template. When not provided,
the name of the decorated property is used.
```typescript
Declare reusable pipe function.
A "pure" pipe is only re-evaluated when either the input or any of the arguments change.
When not specified, pipes default to being pure.
{@example core/ts/metadata/metadata.ts region='pipe'}
Defines template and style encapsulation options available for Component's View.
See {@link ViewMetadata#encapsulation}.
Emulate Native scoping of styles by adding an attribute containing surrogate id to the Host
Element and pre-processing the style rules provided via
{@link ViewMetadata#styles} or {@link ViewMetadata#stylesUrls}, and adding the new Host Element
attribute to all selectors.
This is the default option.
Use the native encapsulation mechanism of the renderer.
For the DOM this means using Shadow DOM and creating a ShadowRoot for Component's Host Element.
Don't provide any template or style encapsulation.
Metadata properties available for configuring Views.
Each Angular component requires a single @Component and at least one @View annotation. The
@View annotation specifies the HTML template to use, and lists the directives that are active
within the template.
When a component is instantiated, the template is loaded into the component's shadow root, and the expressions and statements in the template are evaluated against the component.
For details on the @Component annotation, see ComponentMetadata.
```
Specifies a list of directives that can be used within a template.
Directives must be listed explicitly to provide proper component encapsulation.
```javascript
Specify how the template and the styles should be encapsulated.
The default is {@link ViewEncapsulation#Emulated ViewEncapsulation.Emulated} if the view
has styles,
otherwise {@link ViewEncapsulation#None ViewEncapsulation.None}.
Specifies stylesheet URLs for an Angular component.
Specifies an inline stylesheet for an Angular component.
Specifies an inline template for an Angular component.
NOTE: Only one of templateUrl or template can be defined per View.
Specifies a template URL for an Angular component.
NOTE: Only one of templateUrl or template can be defined per View.
Map of PipeMetadata names to PipeMetadata implementations.
A default set of providers which should be included in any Angular platform.
A token that can be provided when bootstraping an application to make an array of directives available in every component of the application.
```typescript import {PLATFORM_DIRECTIVES} from 'angular2/core'; import {OtherDirective} from './myDirectives';
A token that can be provided when bootstraping an application to make an array of pipes available in every component of the application.
```typescript import {PLATFORM_PIPES} from 'angular2/core'; import {OtherPipe} from './myPipe';
Create trace scope.
Scopes must be strictly nested and are analogous to stack frames, but do not have to follow the stack frames. Instead it is recommended that they follow logical nesting. You may want to use Event Signatures as they are defined in WTF.
Used to mark scope entry. The return value is used to leave the scope.
var myScope = wtfCreateScope('MyClass#myMethod(ascii someVal)');
someMethod() {
var s = myScope('Foo'); // 'Foo' gets stored in tracing UI
// DO SOME WORK HERE
return wtfLeave(s, 123); // Return value 123
}
Note, adding try-finally block around the work to ensure that wtfLeave gets called can
negatively impact the performance of your application. For this reason we recommend that
you don't add them to ensure that wtfLeave gets called. In production wtfLeave is a noop and
so try-finally block has no value. When debugging perf issues, skipping wtfLeave, do to
exception, will produce incorrect trace, but presence of exception signifies logic error which
needs to be fixed before the app should be profiled. Add try-finally only when you expect that
an exception is expected during normal execution while profiling.
True if WTF is enabled.
Ends a async time range operation. [range] is the return value from [wtfStartTimeRange] Async ranges only work if WTF has been enabled.
Used to mark end of Scope.
scope to end.returnValue (optional) to be passed to the WTF.Returns the `returnValue for easy chaining.
Used to mark Async start. Async are similar to scope but they don't have to be strictly nested. The return value is used in the call to [endAsync]. Async ranges only work if WTF has been enabled.
someMethod() {
var s = wtfStartTimeRange('HTTP:GET', 'some.url');
var future = new Future.delay(5).then((_) {
wtfEndTimeRange(s);
});
}
A scope function for the Web Tracing Framework (WTF).
This is here because DART requires it. It is noop in JS.
The Reflector used internally in Angular to access metadata about symbols.
Reflective information about a symbol, including annotations, interfaces, and other metadata.
Provides access to reflection data about symbols. Used internally by Angular to power dependency injection and compilation.
Lists types for which reflection information was not requested since {@link #trackUsage} was called. This list could later be audited as potential dead code.
Causes this reflector to track keys used to access
ReflectionInfo objects.
Provides read-only access to reflection data about symbols. Used internally by Angular to power dependency injection and compilation.
Used only in debug mode to serialize property changes to comment nodes, such as placeholders.
Injectable service that provides a low-level interface for modifying the UI.
Use this service to bypass Angular's templating and make custom UI changes that can't be expressed declaratively. For example if you need to set a property or an attribute whose name is not statically known, use {@link #setElementProperty} or {@link #setElementAttribute} respectively.
If you are implementing a custom renderer, you must implement this interface.
The default Renderer implementation is DomRenderer. Also available is WebWorkerRenderer.
The Testability service provides testing hooks that can be accessed from the browser and by services such as Protractor. Each bootstrapped Angular application on the page will have an instance of Testability.
Whether any work was done since the last 'whenStable' callback. This is useful to detect if this could have potentially destabilized another component while it is stabilizing.
A global registry of Testability instances for specific elements.
Adapter interface for retrieving the Testability service associated for a
particular context.
Set the GetTestability implementation used by the Angular testing framework.
Declares the interface to be used with Class.
Required constructor function for a class.
The function may be optionally wrapped in an Array, in which case additional parameter
annotations may be specified.
The number of arguments and the number of parameter annotations must match.
See Class for example of usage.
Optional argument for specifying the superclass.
Invoke as ES7 decorator.
DSL syntax:
var MyClass = ng
.Component({...})
.View({...})
.Class({...});
ES7 syntax:
```
An interface implemented by all Angular type decorators, which allows them to be used as ES7 decorators as well as Angular DSL syntax.
DSL syntax:
var MyClass = ng
.Component({...})
.View({...})
.Class({...});
ES7 syntax:
```
Storage for the accumulated annotations so far used by the DSL syntax.
Used by Class to annotate the generated class.
Generate a class from the definition and annotate it with {@link TypeDecorator#annotations}.
Provides a way for expressing ES6 classes with parameter annotations in ES5.
var Greeter = ng.Class({
constructor: function(name) {
this.name = name;
},
greet: function() {
alert('Hello ' + this.name + '!');
}
});
is equivalent to ES6:
class Greeter {
constructor(name) {
this.name = name;
}
greet() {
alert('Hello ' + this.name + '!');
}
}
or equivalent to ES5:
var Greeter = function (name) {
this.name = name;
}
Greeter.prototype.greet = function () {
alert('Hello ' + this.name + '!');
}
var MyService = ng.Class({
constructor: [String, [new Query(), QueryList], function(name, queryList) {
...
}]
});
is equivalent to ES6:
class MyService {
constructor(name: string, @Query() queryList: QueryList) {
...
}
}
var Shape = ng.Class({
constructor: (color) {
this.color = color;
}
});
var Square = ng.Class({
extends: Shape,
constructor: function(color, size) {
Shape.call(this, color);
this.size = size;
}
});
An injectable service for executing work inside or outside of the Angular zone.
The most common use of this service is to optimize performance when starting a work consisting of one or more asynchronous tasks that don't require UI updates or error handling to be handled by Angular. Such tasks can be kicked off via {@link #runOutsideAngular} and if needed, these tasks can reenter the Angular zone via {@link #run}.
``` import {Component, View, NgZone} from 'angular2/core'; import {NgIf} from 'angular2/common';
whether to enable long stack trace. They should only be enabled in development mode as they significantly impact perf.
Whether there are any outstanding microtasks.
Whether there are any outstanding microtasks.
Notify that an error has been delivered.
Notifies when there is no more microtasks enqueue in the current VM Turn. This is a hint for Angular to do change detection, which may enqueue more microtasks. For this reason this event can fire multiple times per VM Turn.
Notifies when the last onMicrotaskEmpty has run and there are no more microtasks, which
implies we are about to relinquish VM turn.
This event gets called just once.
Notifies when code enters Angular Zone. This gets fired first on VM Turn.
Executes the fn function synchronously within the Angular zone and returns value returned by
the function.
Running functions via run allows you to reenter Angular zone from a task that was executed
outside of the Angular zone (typically started via {@link #runOutsideAngular}).
Any future tasks or microtasks scheduled from within this function will continue executing from within the Angular zone.
Executes the fn function synchronously in Angular's parent zone and returns value returned by
the function.
Running functions via runOutsideAngular allows you to escape Angular's zone and do work that
doesn't trigger Angular change-detection or is subject to Angular's error handling.
Any future tasks or microtasks scheduled from within this function will continue executing from outside of the Angular zone.
Use {@link #run} to reenter the Angular zone and do work that updates the application model.
Stores error information; delivered via [NgZone.onError] stream.
Use by directives and components to emit custom Events.
In the following example, Zippy alternatively emits open and close events when its
title gets clicked:
```
Creates an instance of [EventEmitter], which depending on [isAsync], delivers events synchronously or asynchronously.
a handler for each value emitted by the observable
a promise that either resolves on observable completion or rejects with the handled error
Returns whether obs has any subscribers listening to events.
A base class for the WrappedException that can be used to identify a WrappedException from ExceptionHandler without adding circular dependency.
JS version of browser APIs. This library can only run in the browser.
Wraps Javascript Objects
A boolean-valued function over a value, possibly including context information regarding that value's position in an array.
Provides a hook for centralized exception handling.
The default implementation of ExceptionHandler prints error messages to the Console. To
intercept error handling,
write a custom exception handler that replaces this default as appropriate for your app.
class MyExceptionHandler implements ExceptionHandler {
call(error, stackTrace = null, reason = null) {
// do something with the exception
}
}
bootstrap(MyApp, [provide(ExceptionHandler, {useClass: MyExceptionHandler})])
Wraps an exception and provides additional context or information.
Runtime representation of a type that is constructable (non-abstract).
Returns the name of the function. Function names are read-only and can not be changed.
Determines whether the given value inherits from this function if this function was used as a constructor function.
A constructor function can control which objects are recognized as its instances by 'instanceof' by overriding this method.
Calls the function, substituting the specified object for the this value of the function, and the specified array for the arguments of the function.
The object to be used as the this object.
A set of arguments to be passed to the function.
For a given function, creates a bound function that has the same body as the original function. The this object of the bound function is associated with the specified object, and has the specified initial parameters.
An object to which the this keyword can refer inside the new function.
A list of arguments to be passed to the new function.
Calls a method of an object, substituting another object for the current object.
The object to be used as the current object.
A list of arguments to be passed to the method.
Runtime representation a type that a Component or other object is instances of.
An example of a Type is MyCustomComponent class, which in JavaScript is be represented by
the MyCustomComponent constructor function.
Returns the name of the function. Function names are read-only and can not be changed.
Determines whether the given value inherits from this function if this function was used as a constructor function.
A constructor function can control which objects are recognized as its instances by 'instanceof' by overriding this method.
Calls the function, substituting the specified object for the this value of the function, and the specified array for the arguments of the function.
The object to be used as the this object.
A set of arguments to be passed to the function.
For a given function, creates a bound function that has the same body as the original function. The this object of the bound function is associated with the specified object, and has the specified initial parameters.
An object to which the this keyword can refer inside the new function.
A list of arguments to be passed to the new function.
Calls a method of an object, substituting another object for the current object.
The object to be used as the current object.
A list of arguments to be passed to the method.
Disable Angular's development mode, which turns off assertions and other checks within the framework.
One important assertion this disables verifies that a change detection pass does not result in additional changes to any bindings (also known as unidirectional data flow).
A backend for http that uses the XMLHttpRequest browser API.
Take care not to evaluate this in non-browser contexts.
A ConnectionBackend that uses the JSONP strategy of making requests.
Abstract base class for an in-flight JSONP request.
The ReadyState of this request.
The outgoing HTTP request.
An observable that completes with the response, when the request is finished.
Callback called when the JSONP request completes, to notify the application of the new data.
The ReadyState of this request.
The outgoing HTTP request.
An observable that completes with the response, when the request is finished.
A mock backend for testing the Http service.
This class can be injected in tests, and should be used to override providers to other backends, such as XHRBackend.
import {BaseRequestOptions, Http} from 'angular2/http';
import {MockBackend} from 'angular2/http/testing';
it('should get some data', inject([AsyncTestCompleter], (async) => {
var connection;
var injector = Injector.resolveAndCreate([
MockBackend,
provide(Http, {useFactory: (backend, options) => {
return new Http(backend, options);
}, deps: [MockBackend, BaseRequestOptions]})]);
var http = injector.get(Http);
var backend = injector.get(MockBackend);
//Assign any newly-created connection to local variable
backend.connections.subscribe(c => connection = c);
http.request('data.json').subscribe((res) => {
expect(res.text()).toBe('awesome');
async.done();
});
connection.mockRespond(new Response('awesome'));
}));
This method only exists in the mock implementation, not in real Backends.
EventEmitter of MockConnection instances that have been created by this backend. Can be subscribed to in order to respond to connections.
import {Http, BaseRequestOptions} from 'angular2/http';
import {MockBackend} from 'angular2/http/testing';
import {Injector} from 'angular2/core';
it('should get a response', () => {
var connection; //this will be set when a new connection is emitted from the backend.
var text; //this will be set from mock response
var injector = Injector.resolveAndCreate([
MockBackend,
provide(Http, {useFactory: (backend, options) => {
return new Http(backend, options);
}, deps: [MockBackend, BaseRequestOptions]}]);
var backend = injector.get(MockBackend);
var http = injector.get(Http);
backend.connections.subscribe(c => connection = c);
http.request('something.json').subscribe(res => {
text = res.text();
});
connection.mockRespond(new Response({body: 'Something'}));
expect(text).toBe('Something');
});
This property only exists in the mock implementation, not in real Backends.
An array representation of connections. This array will be updated with each connection that
is created by this backend.
This property only exists in the mock implementation, not in real Backends.
EventEmitter of MockConnection instances that haven't yet been resolved (i.e.
with a readyState
less than 4). Used internally to verify that no connections are pending via the
verifyNoPendingRequests method.
This property only exists in the mock implementation, not in real Backends.
Creates a new MockConnection. This is equivalent to calling new
MockConnection(), except that it also will emit the new Connection to the connections
emitter of this MockBackend instance. This method will usually only be used by tests
against the framework itself, not by end-users.
Can be used in conjunction with verifyNoPendingRequests to resolve any not-yet-resolve
connections, if it's expected that there are connections that have not yet received a response.
This method only exists in the mock implementation, not in real Backends.
Checks all connections, and raises an exception if any connection has not received a response.
This method only exists in the mock implementation, not in real Backends.
Mock Connection to represent a Connection for tests.
Describes the state of the connection, based on XMLHttpRequest.readyState, but with
additional states. For example, state 5 indicates an aborted connection.
Request instance used to create the connection.
EventEmitter of Response. Can be subscribed to in order to be notified when a response is available.
Emits the provided error object as an error to the Response EventEmitter returned from Http.
Sends a mock response to the connection. This response is the value that is emitted to the EventEmitter returned by Http.
var connection;
backend.connections.subscribe(c => connection = c);
http.request('data.json').subscribe(res => console.log(res.text()));
connection.mockRespond(new Response('fake response')); //logs 'fake response'
Creates XHRConnection instances.
This class would typically not be used by end users, but could be overridden if a different backend implementation should be used, such as in a node backend.
``` import {Http, MyNodeBackend, HTTP_PROVIDERS, BaseRequestOptions} from 'angular2/http';
Creates connections using XMLHttpRequest. Given a fully-qualified
request, an XHRConnection will immediately create an XMLHttpRequest object and send the
request.
This class would typically not be created or interacted with directly inside applications, though the MockConnection may be interacted with in tests.
Response EventEmitter which emits a single Response value on load event of
XMLHttpRequest.
Subclass of RequestOptions, with default values.
Default values:
This class could be extended and bound to the RequestOptions class when configuring an Injector, in order to override the default options used by Http to create and send Requests.
import {provide} from 'angular2/core';
import {bootstrap} from 'angular2/platform/browser';
import {HTTP_PROVIDERS, Http, BaseRequestOptions, RequestOptions} from 'angular2/http';
import {App} from './myapp';
class MyOptions extends BaseRequestOptions {
search: string = 'coreTeam=true';
}
bootstrap(App, [HTTP_PROVIDERS, provide(RequestOptions, {useClass: MyOptions})]);
The options could also be extended when manually creating a Request object.
import {BaseRequestOptions, Request, RequestMethod} from 'angular2/http';
var options = new BaseRequestOptions();
var req = new Request(options.merge({
method: RequestMethod.Post,
url: 'https://google.com'
}));
console.log('req.method:', RequestMethod[req.method]); // Post
console.log('options.url:', options.url); // null
console.log('req.url:', req.url); // https://google.com
Body to be used when creating a Request.
Http method with which to execute a Request. Acceptable methods are defined in the RequestMethod enum.
Search parameters to be included in a Request.
Url with which to perform a Request.
Creates a copy of the RequestOptions instance, using the optional input as values to override
existing values. This method will not change the values of the instance on which it is being
called.
Note that headers and search will override existing values completely if present in
the options object. If these values should be merged, it should be done prior to calling
merge on the RequestOptions instance.
import {RequestOptions, Request, RequestMethod} from 'angular2/http';
var options = new RequestOptions({
method: RequestMethod.Post
});
var req = new Request(options.merge({
url: 'https://google.com'
}));
console.log('req.method:', RequestMethod[req.method]); // Post
console.log('options.url:', options.url); // null
console.log('req.url:', req.url); // https://google.com
Creates a request options object to be optionally provided when instantiating a Request.
This class is based on the RequestInit description in the Fetch
Spec.
All values are null by default. Typical defaults can be found in the BaseRequestOptions
class, which sub-classes RequestOptions.
import {RequestOptions, Request, RequestMethod} from 'angular2/http';
var options = new RequestOptions({
method: RequestMethod.Post,
url: 'https://google.com'
});
var req = new Request(options);
console.log('req.method:', RequestMethod[req.method]); // Post
console.log('options.url:', options.url); // https://google.com
Body to be used when creating a Request.
Http method with which to execute a Request. Acceptable methods are defined in the RequestMethod enum.
Search parameters to be included in a Request.
Url with which to perform a Request.
Creates a copy of the RequestOptions instance, using the optional input as values to override
existing values. This method will not change the values of the instance on which it is being
called.
Note that headers and search will override existing values completely if present in
the options object. If these values should be merged, it should be done prior to calling
merge on the RequestOptions instance.
import {RequestOptions, Request, RequestMethod} from 'angular2/http';
var options = new RequestOptions({
method: RequestMethod.Post
});
var req = new Request(options.merge({
url: 'https://google.com'
}));
console.log('req.method:', RequestMethod[req.method]); // Post
console.log('options.url:', options.url); // null
console.log('req.url:', req.url); // https://google.com
Subclass of ResponseOptions, with default values.
Default values:
This class could be extended and bound to the ResponseOptions class when configuring an Injector, in order to override the default options used by Http to create Responses.
import {provide} from 'angular2/core';
import {bootstrap} from 'angular2/platform/browser';
import {HTTP_PROVIDERS, Headers, Http, BaseResponseOptions, ResponseOptions} from
'angular2/http';
import {App} from './myapp';
class MyOptions extends BaseResponseOptions {
headers:Headers = new Headers({network: 'github'});
}
bootstrap(App, [HTTP_PROVIDERS, provide(ResponseOptions, {useClass: MyOptions})]);
The options could also be extended when manually creating a Response object.
import {BaseResponseOptions, Response} from 'angular2/http';
var options = new BaseResponseOptions();
var res = new Response(options.merge({
body: 'Angular2',
headers: new Headers({framework: 'angular'})
}));
console.log('res.headers.get("framework"):', res.headers.get('framework')); // angular
console.log('res.text():', res.text()); // Angular2;
String or Object representing the body of the Response.
Response headers
Http status code associated with the response.
Creates a copy of the ResponseOptions instance, using the optional input as values to
override
existing values. This method will not change the values of the instance on which it is being
called.
This may be useful when sharing a base ResponseOptions object inside tests,
where certain properties may change from test to test.
import {ResponseOptions, Response} from 'angular2/http';
var options = new ResponseOptions({
body: {name: 'Jeff'}
});
var res = new Response(options.merge({
url: 'https://google.com'
}));
console.log('options.url:', options.url); // null
console.log('res.json():', res.json()); // Object {name: "Jeff"}
console.log('res.url:', res.url); // https://google.com
Creates a response options object to be optionally provided when instantiating a Response.
This class is based on the ResponseInit description in the Fetch
Spec.
All values are null by default. Typical defaults can be found in the
BaseResponseOptions class, which sub-classes ResponseOptions.
This class may be used in tests to build Responses for mock responses (see MockBackend).
import {ResponseOptions, Response} from 'angular2/http';
var options = new ResponseOptions({
body: '{"name":"Jeff"}'
});
var res = new Response(options);
console.log('res.json():', res.json()); // Object {name: "Jeff"}
String or Object representing the body of the Response.
Response headers
Http status code associated with the response.
Creates a copy of the ResponseOptions instance, using the optional input as values to
override
existing values. This method will not change the values of the instance on which it is being
called.
This may be useful when sharing a base ResponseOptions object inside tests,
where certain properties may change from test to test.
import {ResponseOptions, Response} from 'angular2/http';
var options = new ResponseOptions({
body: {name: 'Jeff'}
});
var res = new Response(options.merge({
url: 'https://google.com'
}));
console.log('options.url:', options.url); // null
console.log('res.json():', res.json()); // Object {name: "Jeff"}
console.log('res.url:', res.url); // https://google.com
All possible states in which a connection can be, based on
States from the XMLHttpRequest spec, but with an
additional "CANCELLED" state.
Supported http methods.
Acceptable response types to be associated with a Response, based on ResponseType from the Fetch spec.
Polyfill for Headers, as specified in the Fetch Spec.
The only known difference between this Headers implementation and the spec is the
lack of an entries method.
import {Headers} from 'angular2/http';
var firstHeaders = new Headers();
firstHeaders.append('Content-Type', 'image/jpeg');
console.log(firstHeaders.get('Content-Type')) //'image/jpeg'
// Create headers from Plain Old JavaScript Object
var secondHeaders = new Headers({
'X-My-Custom-Header': 'Angular'
});
console.log(secondHeaders.get('X-My-Custom-Header')); //'Angular'
var thirdHeaders = new Headers(secondHeaders);
console.log(thirdHeaders.get('X-My-Custom-Header')); //'Angular'
Appends a header to existing list of header values for a given header name.
Deletes all header values for the given name.
This method is not implemented.
Returns first header that matches given name.
Returns list of header values for a given name.
Check for existence of header by given name.
Provides names of set headers
Sets or overrides header value for given name.
Returns string of all headers.
Returns values of all headers.
Returns a new Headers instance from the given DOMString of Response Headers
Performs http requests using XMLHttpRequest as the default backend.
Http is available as an injectable class, with methods to perform http requests. Calling
request returns an Observable which will emit a single Response when a
response is received.
```typescript import {Http, HTTP_PROVIDERS} from 'angular2/http';
Performs a request with delete http method.
Performs a request with get http method.
Performs a request with head http method.
Performs a request with patch http method.
Performs a request with post http method.
Performs a request with put http method.
Performs any type of http request. First argument is required, and can either be a url or a Request instance. If the first argument is a url, an optional RequestOptions object can be provided as the 2nd argument. The options object will be merged with the values of BaseRequestOptions before performing the request.
Performs a request with delete http method.
Performs a request with get http method.
Performs a request with head http method.
Performs a request with patch http method.
Performs a request with post http method.
Performs a request with put http method.
Performs any type of http request. First argument is required, and can either be a url or a Request instance. If the first argument is a url, an optional RequestOptions object can be provided as the 2nd argument. The options object will be merged with the values of BaseRequestOptions before performing the request.
Abstract class from which real connections are derived.
Abstract class from which real backends are derived.
The primary purpose of a ConnectionBackend is to create new connections to fulfill a given
Request.
Required structure when constructing new Request();
Interface for options to construct a RequestOptions, based on RequestInit from the Fetch spec.
Interface for options to construct a Response, based on ResponseInit from the Fetch spec.
Creates Request instances from provided values.
The Request's interface is inspired by the Request constructor defined in the Fetch Spec, but is considered a static value whose body can be accessed many times. There are other differences in the implementation, but this is the most significant.
Request instances are typically created by higher-level classes, like Http and
Jsonp, but it may occasionally be useful to explicitly create Request instances.
One such example is when creating services that wrap higher-level services, like Http,
where it may be useful to generate a Request with arbitrary headers and search params.
```typescript import {Injectable, Injector} from 'angular2/core'; import {HTTP_PROVIDERS, Http, Request, RequestMethod} from 'angular2/http';
Headers instance
Http method with which to perform the request.
Url of the remote resource
Returns the request's body as string, assuming that body exists. If body is undefined, return empty string.
Creates Response instances from provided values.
Though this object isn't usually instantiated by end-users, it is the primary object interacted with when it comes time to add data to a view.
http.request('my-friends.txt').subscribe(response => this.friends = response.text());
The Response's interface is inspired by the Response constructor defined in the Fetch Spec, but is considered a static value whose body can be accessed many times. There are other differences in the implementation, but this is the most significant.
Non-standard property
Denotes how many of the response body's bytes have been loaded, for example if the response is the result of a progress event.
Headers object based on the Headers class in the Fetch
Spec.
True if the response's status is within 200-299
Status code returned by server.
Defaults to 200.
Text representing the corresponding reason phrase to the status, as defined in ietf rfc 2616
section 6.1.1
Defaults to "OK"
Non-standard property
Denotes how many bytes are expected in the final response body.
One of "basic", "cors", "default", "error, or "opaque".
Defaults to "default".
URL of response.
Defaults to empty string.
Not yet implemented
Not yet implemented
Attempts to return body as parsed JSON object, or raises an exception.
Returns the body as a string, presuming toString() can be called on the response body.
Map-like representation of url search parameters, based on URLSearchParams in the url living standard, with several extensions for merging URLSearchParams objects:
Creates an i18n-ed version of the parsed template.
Algorithm:
To understand the algorithm, you need to know how partitioning works. Partitioning is required as we can use two i18n comments to group node siblings together. That is why we cannot just use nodes.
Partitioning transforms an array of HtmlAst into an array of Part. A part can optionally contain a root element or a root text node. And it can also contain children. A part can contain i18n property, in which case it needs to be transalted.
Example:
The following array of nodes will be split into four parts:
<a>A</a>
<b i18n>B</b>
<!-- i18n -->
<c>C</c>
D
<!-- /i18n -->
E
Part 1 containing the a tag. It should not be translated. Part 2 containing the b tag. It should be translated. Part 3 containing the c tag and the D text node. It should be translated. Part 4 containing the E text node. It should not be translated.
It is also important to understand how we stringify nodes to create a message.
We walk the tree and replace every element node with a placeholder. We also replace all expressions in interpolation with placeholders. We also insert a placeholder element to wrap a text node containing interpolation.
Example:
The following tree:
<a>A{{I}}</a><b>B</b>
will be stringified into:
<ph name="e0"><ph name="t1">A<ph name="0"/></ph></ph><ph name="e2">B</ph>
This is what the algorithm does:
This is how the merging works:
A message extracted from a template.
The identity of a message is comprised of content and meaning.
description is additional information provided to the translator.
Computes the id of a message
All messages extracted from a template.
Extracts all messages from a template.
Algorithm:
To understand the algorithm, you need to know how partitioning works. Partitioning is required as we can use two i18n comments to group node siblings together. That is why we cannot just use nodes.
Partitioning transforms an array of HtmlAst into an array of Part. A part can optionally contain a root element or a root text node. And it can also contain children. A part can contain i18n property, in which case it needs to be extracted.
Example:
The following array of nodes will be split into four parts:
<a>A</a>
<b i18n>B</b>
<!-- i18n -->
<c>C</c>
D
<!-- /i18n -->
E
Part 1 containing the a tag. It should not be translated. Part 2 containing the b tag. It should be translated. Part 3 containing the c tag and the D text node. It should be translated. Part 4 containing the E text node. It should not be translated..
It is also important to understand how we stringify nodes to create a message.
We walk the tree and replace every element node with a placeholder. We also replace all expressions in interpolation with placeholders. We also insert a placeholder element to wrap a text node containing interpolation.
Example:
The following tree:
<a>A{{I}}</a><b>B</b>
will be stringified into:
<ph name="e0"><ph name="t1">A<ph name="0"/></ph></ph><ph name="e2">B</ph>
This is what the algorithm does:
An i18n error.
functions to be called upon completion
flag used to track whether or not the animation has finished
the animation delay (ms) (whether from CSS or manually set)
the duration (ms) of the animation (whether from CSS or manually set)
functions for removing event listeners
timestamp of when the animation started
total amount of time that the animation should take including delay
Adds the provided classes to the element
Adds events to track when animations have finished
Applies the provided styles to the element
Runs all animation callbacks and removes temporary classes
Adds animation callbacks to be called upon completion
Converts the duration string to the number of milliseconds
Removes the provided classes from the element
Sets up the initial styles before the animation is started
After the initial setup has occurred, this method adds the animation styles
Strips the letters from the duration string
Adds a temporary class that will be removed at the end of the animation
Adds a class that will remain on the element after the animation has finished
Removes a class from the element
Sets the animation delay (and overrides any defined through CSS)
Sets the animation duration (and overrides any defined through CSS)
Sets the initial styles for the animation
Sets styles for both the initial state and the destination state
Sets the destination styles for the animation
An implementation of DirectiveResolver that allows overriding various properties of directives.
A spy for Location that allows tests to fire simulated location events.
A no-op implementation of ApplicationRef, useful for testing.
A mock implementation of LocationStrategy that allows tests to fire simulated location events.
A mock implementation of NgZone.
Whether there are any outstanding microtasks.
Whether there are any outstanding microtasks.
Notify that an error has been delivered.
Notifies when there is no more microtasks enqueue in the current VM Turn. This is a hint for Angular to do change detection, which may enqueue more microtasks. For this reason this event can fire multiple times per VM Turn.
Notifies when code enters Angular Zone. This gets fired first on VM Turn.
Overrides a directive from the component ViewMetadata.
Returns the ViewMetadata for a component:
ViewResolver,
see setView.overrideViewDirective.setInlineTemplate.Overrides the inline template for a component - other configuration remains unchanged.
Overrides the ViewMetadata for a component.
A DomAdapter powered by full browser DOM APIs.
Provides DOM operations in any browser environment.
Maps attribute names to their corresponding property names for cases where attribute name doesn't match property name.
A service that can be used to get and set the title of a current HTML document.
Since an Angular 2 application can't be bootstrapped on the entire HTML document (<html> tag)
it is not possible to bind to the text property of the HTMLTitleElement elements
(representing the <title> tag). Instead, this service can be used to set and get the current
title value.
Get the title of the current HTML document.
Set the title of the current HTML document.
Entry point for all Angular profiling-related debug tools. This object
corresponds to the ng.profiler in the dev console.
Exercises change detection in a loop and then prints the average amount of time in milliseconds how long a single round of change detection takes for the current state of the UI. It runs a minimum of 5 rounds for a minimum of 500 milliseconds.
Optionally, a user may pass a config parameter containing a map of
options. Supported options are:
record (boolean) - causes the profiler to record a CPU profile while
it exercises the change detector. Example:
ng.profiler.timeChangeDetection({record: true})
Entry point for all Angular debug tools. This object corresponds to the ng
global variable accessible in the dev console.
Disables Angular 2 tools.
Enabled Angular 2 debug tools that are accessible via your browser's developer console.
Usage:
ng. (usually the console will show auto-complete suggestion)ng.profiler.timeChangeDetection()
then hit Enter.A set of providers to initialize an Angular application in a web browser.
Used automatically by bootstrap, or can be passed to PlatformRef.application.
A set of providers to initialize the Angular platform in a web browser.
Used automatically by bootstrap, or can be passed to platform.
Predicates for use with DebugElement's query functions.
Match all elements.
{@example platform/dom/debug/ts/by/by.ts region='by_all'}
Match elements by the given CSS selector.
{@example platform/dom/debug/ts/by/by.ts region='by_css'}
Match elements that have the given directive present.
{@example platform/dom/debug/ts/by/by.ts region='by_directive'}
Providers which support debugging Angular applications (e.g. via ng.probe).
Returns a DebugElement for the given native DOM element, or null if the given native element does not have an Angular view associated with it.
Provides DOM operations in an environment-agnostic way.
Maps attribute names to their corresponding property names for cases where attribute name doesn't match property name.
Performs animations if necessary
If animations are necessary, performs animations then removes the element; otherwise, it just removes the element.
A DI Token representing the main rendering context. In a browser this is the DOM Document.
Note: Document might not be available in the Application Context when Application and Rendering Contexts are not the same (e.g. when running the application into a Web Worker).
Wrapper class that exposes the Worker and underlying MessageBus for lower level message passing.
An array of providers that should be passed into application() when initializing a new Worker.
Spawns a new class and initializes the WebWorkerInstance
A list of Providers. To use the router in a Worker enabled application you must include these providers when setting up the render thread.
The RouterLink directive lets you link to specific parts of your app.
Consider the following route configuration:
```
The square bracket
The square bracket
e.g., './User', 'Modal' in ./User[Modal(param: value)]
e.g., param:value in ./User[Modal(param: value)]
A compiler plugin that implements the router link DSL.
A router outlet is a placeholder that Angular dynamically fills based on the application's route.
<router-outlet></router-outlet>
Called by the Router to instantiate a new component during the commit phase of a navigation.
This method in turn is responsible for calling the routerOnActivate hook of its child.
Called by the Router when an outlet disposes of a component's contents.
This method in turn is responsible for calling the routerOnDeactivate hook of its child.
Called by the Router during the commit phase of a navigation when an outlet
reuses a component between different routes.
This method in turn is responsible for calling the routerOnReuse hook of its child.
Called by the Router during recognition phase of a navigation.
If this resolves to false, the given navigation is cancelled.
This method delegates to the child component's routerCanDeactivate hook if it exists,
and otherwise resolves to true.
Called by the Router during recognition phase of a navigation.
If the new child component has a different Type than the existing child component,
this will resolve to false. You can't reuse an old component when the new component
is of a different Type.
Otherwise, this method delegates to the child component's routerCanReuse hook if it exists,
or resolves to true if the hook is not present.
A ComponentInstruction represents the route state for a single component.
ComponentInstructions is a public API. Instances of ComponentInstruction are passed
to route lifecycle hooks, like CanActivate.
ComponentInstructions are hash consed. You should
never construct one yourself with "new." Instead, rely on {@link Router/RouteRecognizer} to
construct ComponentInstructions.
You should not modify this object. It should be treated as immutable.
Represents a resolved default route
Returns a new instruction that shares the state of the existing instruction, but with the given child Instruction replacing the existing child.
converts the instruction into a URL string
If the final URL for the instruction is ``
Instruction is a tree of ComponentInstructions with all the information needed
to transition each component in the app to a given route, including all auxiliary routes.
Instructions can be created using {@link Router#generate}, and can be used to
perform route changes with {@link Router#navigateByInstruction}.
``` import {Component} from 'angular2/core'; import {bootstrap} from 'angular2/platform/browser'; import {Router, ROUTER_DIRECTIVES, ROUTER_PROVIDERS, RouteConfig} from 'angular2/router';
Returns a new instruction that shares the state of the existing instruction, but with the given child Instruction replacing the existing child.
converts the instruction into a URL string
If the final URL for the instruction is ``
Returns a new instruction that shares the state of the existing instruction, but with the given child Instruction replacing the existing child.
converts the instruction into a URL string
If the final URL for the instruction is ``
a resolved instruction has an outlet instruction for itself, but maybe not for...
Returns a new instruction that shares the state of the existing instruction, but with the given child Instruction replacing the existing child.
converts the instruction into a URL string
If the final URL for the instruction is ``
RouteData is an immutable map of additional data you can configure in your Route.
You can inject RouteData into the constructor of a component to use it.
``` import {Component} from 'angular2/core'; import {bootstrap} from 'angular2/platform/browser'; import {Router, ROUTER_DIRECTIVES, ROUTER_PROVIDERS, RouteConfig, RouteData} from 'angular2/router';
RouteParams is an immutable map of parameters for the given route
based on the url matcher and optional parameters for that route.
You can inject RouteParams into the constructor of a component to use it.
``` import {Component} from 'angular2/core'; import {bootstrap} from 'angular2/platform/browser'; import {Router, ROUTER_DIRECTIVES, ROUTER_PROVIDERS, RouteConfig, RouteParams} from 'angular2/router';
Represents a component that may need to do some redirection or lazy loading at a later time.
Returns a new instruction that shares the state of the existing instruction, but with the given child Instruction replacing the existing child.
converts the instruction into a URL string
If the final URL for the instruction is ``
Defines route lifecycle method routerCanDeactivate, which is called by the router to determine
if a component can be removed as part of a navigation.
The routerCanDeactivate hook is called with two ComponentInstructions as parameters,
the
first representing the current route being navigated to, and the second parameter
representing the previous route.
If routerCanDeactivate returns or resolves to false, the navigation is cancelled. If it
returns or
resolves to true, then the navigation continues, and the component will be deactivated
(the OnDeactivate hook will be run) and removed.
If routerCanDeactivate throws or rejects, the navigation is also cancelled.
{@example router/ts/can_deactivate/can_deactivate_example.ts region='routerCanDeactivate'}
Defines route lifecycle method routerCanReuse, which is called by the router to determine
whether a
component should be reused across routes, or whether to destroy and instantiate a new component.
The routerCanReuse hook is called with two ComponentInstructions as parameters, the
first
representing the current route being navigated to, and the second parameter representing the
previous route.
If routerCanReuse returns or resolves to true, the component instance will be reused and the
OnDeactivate hook will be run. If routerCanReuse returns or resolves to false, a new
component will be instantiated, and the existing component will be deactivated and removed as
part of the navigation.
If routerCanReuse throws or rejects, the navigation will be cancelled.
{@example router/ts/reuse/reuse_example.ts region='reuseCmp'}
Defines route lifecycle method routerOnActivate, which is called by the router at the end of a
successful route navigation.
For a single component's navigation, only one of either OnActivate or OnReuse will be called depending on the result of CanReuse.
The routerOnActivate hook is called with two ComponentInstructions as parameters, the
first
representing the current route being navigated to, and the second parameter representing the
previous route or null.
If routerOnActivate returns a promise, the route change will wait until the promise settles to
instantiate and activate child components.
{@example router/ts/on_activate/on_activate_example.ts region='routerOnActivate'}
Defines route lifecycle method routerOnDeactivate, which is called by the router before
destroying
a component as part of a route change.
The routerOnDeactivate hook is called with two ComponentInstructions as parameters, the
first
representing the current route being navigated to, and the second parameter representing the
previous route.
If routerOnDeactivate returns a promise, the route change will wait until the promise settles.
{@example router/ts/on_deactivate/on_deactivate_example.ts region='routerOnDeactivate'}
Defines route lifecycle method routerOnReuse, which is called by the router at the end of a
successful route navigation when CanReuse is implemented and returns or resolves to true.
For a single component's navigation, only one of either OnActivate or OnReuse will be called, depending on the result of CanReuse.
The routerOnReuse hook is called with two ComponentInstructions as parameters, the
first
representing the current route being navigated to, and the second parameter representing the
previous route or null.
{@example router/ts/reuse/reuse_example.ts region='reuseCmp'}
Defines route lifecycle hook CanActivate, which is called by the router to determine
if a component can be instantiated as part of a navigation.
The CanActivate hook is called with two ComponentInstructions as parameters, the first
representing the current route being navigated to, and the second parameter representing the
previous route or null.
```typescript
PlatformLocation encapsulates all of the direct calls to platform APIs.
This class should not be used directly by an application developer. Instead, use
Location.
HashLocationStrategy is a LocationStrategy used to configure the
Location service to represent its state in the
hash fragment
of the browser's URL.
For instance, if you call location.go('/foo'), the browser's URL will become
example.com#/foo.
``` import {Component, provide} from 'angular2/core'; import { ROUTER_DIRECTIVES, ROUTER_PROVIDERS, RouteConfig, Location, LocationStrategy, HashLocationStrategy } from 'angular2/router';
Location is a service that applications can use to interact with a browser's URL.
Depending on which LocationStrategy is used, Location will either persist
to the URL's path or the URL's hash segment.
Note: it's better to use {@link Router#navigate} service to trigger route changes. Use
Location only if you need to interact with or create normalized URLs outside of
routing.
Location is responsible for normalizing the URL against the application's base href.
A normalized URL is absolute from the URL host, includes the application's base href, and has no
trailing slash:
/my/app/user/123 is normalizedmy/app/user/123 is not normalized/my/app/user/123/ is not normalized``` import {Component} from 'angular2/core'; import { ROUTER_DIRECTIVES, ROUTER_PROVIDERS, RouteConfig, Location } from 'angular2/router';
Navigates back in the platform's history.
Navigates forward in the platform's history.
Changes the browsers URL to the normalized version of the given URL, and pushes a new item onto the platform's history.
Given a string representing a URL, returns the normalized URL path without leading or trailing slashes
Returns the normalized URL path.
Given a string representing a URL, returns the platform-specific external URL path.
If the given URL doesn't begin with a leading slash ('/'), this method adds one
before normalizing. This method will also add a hash if HashLocationStrategy is
used, or the APP_BASE_HREF if the PathLocationStrategy is in use.
Changes the browsers URL to the normalized version of the given URL, and replaces the top item on the platform's history stack.
Subscribe to the platform's popState events.
LocationStrategy is responsible for representing and reading route state
from the browser's URL. Angular provides two strategies:
HashLocationStrategy and PathLocationStrategy (default).
This is used under the hood of the Location service.
Applications should use the Router or Location services to interact with application route state.
For instance, HashLocationStrategy produces URLs like
http://example.com#/foo, and PathLocationStrategy produces
http://example.com/foo as an equivalent URL.
See these two classes for more.
The APP_BASE_HREF token represents the base href to be used with the
PathLocationStrategy.
If you're using PathLocationStrategy, you must provide a provider to a string representing the URL prefix that should be preserved when generating and recognizing URLs.
``` import {Component} from 'angular2/core'; import {ROUTER_DIRECTIVES, ROUTER_PROVIDERS, RouteConfig} from 'angular2/router';
PathLocationStrategy is a LocationStrategy used to configure the
Location service to represent its state in the
path of the
browser's URL.
PathLocationStrategy is the default binding for LocationStrategy
provided in ROUTER_PROVIDERS.
If you're using PathLocationStrategy, you must provide a provider for
APP_BASE_HREF to a string representing the URL prefix that should
be preserved when generating and recognizing URLs.
For instance, if you provide an APP_BASE_HREF of '/my/app' and call
location.go('/foo'), the browser's URL will become
example.com/my/app/foo.
``` import {Component, provide} from 'angular2/core'; import { APP_BASE_HREF ROUTER_DIRECTIVES, ROUTER_PROVIDERS, RouteConfig, Location } from 'angular2/router';
This class should not be used directly by an application developer. Instead, use Location.
PlatformLocation encapsulates all calls to DOM apis, which allows the Router to be platform
agnostic.
This means that we can have different implementation of PlatformLocation for the different
platforms
that angular supports. For example, the default PlatformLocation is BrowserPlatformLocation,
however when you run your app in a WebWorker you use WebWorkerPlatformLocation.
The PlatformLocation class is used directly by all implementations of LocationStrategy
when
they need to interact with the DOM apis like pushState, popState, etc...
LocationStrategy in turn is used by the Location service which is used directly
by
the Router in order to navigate between routes. Since all interactions between Router /
Location / LocationStrategy and DOM apis flow through the PlatformLocation
class
they are all platform independent.
A serializable version of the event from onPopState or onHashChange
The RouteConfig decorator defines routes for a given component.
It takes an array of RouteDefinitions.
AsyncRoute is a type of RouteDefinition used to route a path to an asynchronously
loaded component.
It has the following properties:
path is a string that uses the route matcher DSL.loader is a function that returns a promise that resolves to a component.name is an optional CamelCase string representing the name of the route.data is an optional property of any type representing arbitrary route metadata for the given
route. It is injectable via RouteData.useAsDefault is a boolean value. If true, the child route will be navigated to if no child
route is specified during the navigation.``` import {RouteConfig, AsyncRoute} from 'angular2/router';
AuxRoute is a type of RouteDefinition used to define an auxiliary route.
It takes an object with the following properties:
path is a string that uses the route matcher DSL.component a component type.name is an optional CamelCase string representing the name of the route.data is an optional property of any type representing arbitrary route metadata for the given
route. It is injectable via RouteData.``` import {RouteConfig, AuxRoute} from 'angular2/router';
Redirect is a type of RouteDefinition used to route a path to a canonical route.
It has the following properties:
path is a string that uses the route matcher DSL.redirectTo is an array representing the link DSL.Note that redirects do not affect how links are generated. For that, see the useAsDefault
option.
``` import {RouteConfig, Route, Redirect} from 'angular2/router';
Route is a type of RouteDefinition used to route a path to a component.
It has the following properties:
path is a string that uses the route matcher DSL.component a component type.name is an optional CamelCase string representing the name of the route.data is an optional property of any type representing arbitrary route metadata for the given
route. It is injectable via RouteData.useAsDefault is a boolean value. If true, the child route will be navigated to if no child
route is specified during the navigation.``` import {RouteConfig, Route} from 'angular2/router';
The RouteConfig decorator defines routes for a given component.
It takes an array of RouteDefinitions.
Given a JS Object that represents a route config, returns a corresponding Route, AsyncRoute, AuxRoute or Redirect object.
Also wraps an AsyncRoute's loader function to add the loaded component's route config to the
RouteRegistry.
Represents either a component type (type is component) or a loader function
(type is loader).
See also RouteDefinition.
RouteDefinition defines a route within a RouteConfig decorator.
Supported keys:
path or aux (requires exactly one of these)component, loader, redirectTo (requires exactly one of these)name or as (optional) (requires exactly one of these)data (optional)See also Route, AsyncRoute, AuxRoute, and Redirect.
The RouteRegistry holds route configurations for each component in an Angular app. It is responsible for creating Instructions from URLs, and generating URLs based on route and parameters.
Recognizes all parent-child routes, but creates unresolved auxiliary routes
Given a component and a configuration object, add the route to this registry
Reads the annotations of a component and configures the registry based on them
Given a normalized list with component names and params like: ['user', {id: 3 }]
generates a url with a leading slash relative to the provided parentComponent.
If the optional param _aux is true, then we generate starting at an auxiliary
route boundary.
Given a URL and a parent component, return the most specific instruction for navigating the application into the state specified by the url
Token used to bind the component with the top-level RouteConfigs for the application.
``` import {Component} from 'angular2/core'; import { ROUTER_DIRECTIVES, ROUTER_PROVIDERS, RouteConfig } from 'angular2/router';
The current Instruction for the router
Constructs a child router. You probably don't need to use this unless you're writing a reusable component.
Constructs a child router. You probably don't need to use this unless you're writing a reusable component.
Updates this router and all descendant routers according to the given instruction
Dynamically update the routing configuration and trigger a navigation.
router.config([
{ 'path': '/', 'component': IndexComp },
{ 'path': '/user/:id', 'component': UserComp },
]);
Removes the contents of this router's outlet and all descendant outlets
Generate an Instruction based on the provided Route Link DSL.
Given an instruction, returns true if the instruction is currently active,
otherwise false.
Navigate based on the provided Route Link DSL. It's preferred to navigate with this method
over navigateByUrl.
This method takes an array representing the Route Link DSL:
['./MyCmp', {param: 3}]
See the RouterLink directive for more.
Given a URL, returns an instruction representing the component graph
Register an outlet to notified of auxiliary route changes.
You probably don't need to use this unless you're writing a reusable component.
Register an outlet to be notified of primary route changes.
You probably don't need to use this unless you're writing a reusable component.
Navigates to either the last URL successfully navigated to, or the last URL requested if the router has yet to successfully navigate.
Subscribe to URL updates from the router
Unregister an outlet (because it was destroyed, etc).
You probably don't need to use this unless you're writing a custom outlet implementation.
The current Instruction for the router
Constructs a child router. You probably don't need to use this unless you're writing a reusable component.
Constructs a child router. You probably don't need to use this unless you're writing a reusable component.
Dynamically update the routing configuration and trigger a navigation.
router.config([
{ 'path': '/', 'component': IndexComp },
{ 'path': '/user/:id', 'component': UserComp },
]);
Removes the contents of this router's outlet and all descendant outlets
Generate an Instruction based on the provided Route Link DSL.
Given an instruction, returns true if the instruction is currently active,
otherwise false.
Navigate based on the provided Route Link DSL. It's preferred to navigate with this method
over navigateByUrl.
This method takes an array representing the Route Link DSL:
['./MyCmp', {param: 3}]
See the RouterLink directive for more.
Navigate via the provided instruction. Returns a promise that resolves when navigation is complete.
Navigate to a URL. Returns a promise that resolves when navigation is complete.
It's preferred to navigate with navigate instead of this method, since URLs are more brittle.
If the given URL begins with a /, router will navigate absolutely.
If the given URL does not begin with /, the router will navigate relative to this component.
Given a URL, returns an instruction representing the component graph
Register an outlet to notified of auxiliary route changes.
You probably don't need to use this unless you're writing a reusable component.
Register an outlet to be notified of primary route changes.
You probably don't need to use this unless you're writing a reusable component.
Navigates to either the last URL successfully navigated to, or the last URL requested if the router has yet to successfully navigate.
Subscribe to URL updates from the router
Unregister an outlet (because it was destroyed, etc).
You probably don't need to use this unless you're writing a custom outlet implementation.
The Router is responsible for mapping URLs to components.
You can see the state of the router by inspecting the read-only field router.navigating.
This may be useful for showing a spinner, for instance.
Routers and component instances have a 1:1 correspondence.
The router holds reference to a number of RouterOutlet. An outlet is a placeholder that the router dynamically fills in depending on the current URL.
When the router navigates from a URL, it must first recognize it and serialize it into an
Instruction.
The router uses the RouteRegistry to get an Instruction.
The current Instruction for the router
Constructs a child router. You probably don't need to use this unless you're writing a reusable component.
Constructs a child router. You probably don't need to use this unless you're writing a reusable component.
Updates this router and all descendant routers according to the given instruction
Dynamically update the routing configuration and trigger a navigation.
router.config([
{ 'path': '/', 'component': IndexComp },
{ 'path': '/user/:id', 'component': UserComp },
]);
Removes the contents of this router's outlet and all descendant outlets
Generate an Instruction based on the provided Route Link DSL.
Given an instruction, returns true if the instruction is currently active,
otherwise false.
Navigate based on the provided Route Link DSL. It's preferred to navigate with this method
over navigateByUrl.
This method takes an array representing the Route Link DSL:
['./MyCmp', {param: 3}]
See the RouterLink directive for more.
Navigate via the provided instruction. Returns a promise that resolves when navigation is complete.
Navigate to a URL. Returns a promise that resolves when navigation is complete.
It's preferred to navigate with navigate instead of this method, since URLs are more brittle.
If the given URL begins with a /, router will navigate absolutely.
If the given URL does not begin with /, the router will navigate relative to this component.
Given a URL, returns an instruction representing the component graph
Register an outlet to notified of auxiliary route changes.
You probably don't need to use this unless you're writing a reusable component.
Register an outlet to be notified of primary route changes.
You probably don't need to use this unless you're writing a reusable component.
Navigates to either the last URL successfully navigated to, or the last URL requested if the router has yet to successfully navigate.
Subscribe to URL updates from the router
Unregister an outlet (because it was destroyed, etc).
You probably don't need to use this unless you're writing a custom outlet implementation.
Use ROUTER_PROVIDERS instead.
The Platform agnostic ROUTER PROVIDERS
Identified by a ... URL segment. This indicates that the
Route will continue to be matched by child Routers.
Identified by a string starting with :. Indicates a segment
that can contain a value that will be extracted and provided to
a matching Instruction.
Parses a URL string using a given matcher DSL, and generates URLs from param maps
Takes a string representing the matcher DSL
Identified by a string starting with * Indicates that all the following
segments match this route and that the value of these segments should
be provided to a matching Instruction.
Identified by a string not starting with a : or *.
Only matches the URL segments that equal the segment path
ParamRoutePaths are made up of PathSegments, each of which can
match a segment of a URL. Different kind of PathSegments match
URL segments in different ways...
A RuleSet is responsible for recognizing routes for a particular component.
It is consumed by RouteRegistry, which knows how to recognize an entire hierarchy of
components.
Configure additional rules in this rule set from a route definition
true if the config is terminal
Given a URL, returns a list of RouteMatches, which are partial recognitions for some route.
Returns null or a ParsedUrl representing the new path to match
This class represents a parsed URL
Clear the queue of pending timers and microtasks.
Useful for cleaning up after an asynchronous test passes.
{@example testing/ts/fake_async.ts region='pending'}
Wraps a function to be executed in the fakeAsync zone:
flushMicrotasks(),tick() simulates the asynchronous passage of time.If there are any pending timers at the end of the function, an exception will be thrown.
{@example testing/ts/fake_async.ts region='basic'}
The function wrapped to be executed in the fakeAsync zone
Flush any pending microtasks.
Simulates the asynchronous passage of time for the timers in the fakeAsync zone.
The microtasks queue is drained at the very start of this function and after any timer callback has been executed.
{@example testing/ts/fake_async.ts region='basic'}
Number of millisecond, defaults to 0
Jasmine matchers that check Angular specific conditions.
Invert the matchers.
Expect the value to be an instance of a class.
{@example testing/ts/matchers.ts region='toBeAnInstanceOf'}
Expect the value to be a Promise.
{@example testing/ts/matchers.ts region='toBePromise'}
Expect an exception to contain the given error text.
{@example testing/ts/matchers.ts region='toContainError'}
Expect the element to have the given CSS class.
{@example testing/ts/matchers.ts region='toHaveCssClass'}
Expect the element to have the given CSS styles.
{@example testing/ts/matchers.ts region='toHaveCssStyle'}
Expect the element to have exactly the given text.
{@example testing/ts/matchers.ts region='toHaveText'}
Expect a class to implement the interface of the given class.
{@example testing/ts/matchers.ts region='toImplement'}
Expect a string to match the given regular expression.
{@example testing/ts/matchers.ts region='toMatchPattern'}
Expect a function to throw an error with the given error text when executed.
{@example testing/ts/matchers.ts region='toThrowErrorWith'}
Jasmine matching function with Angular matchers mixed in.
{@example testing/ts/matchers.ts region='toHaveText'}
Fixture for debugging and testing a component.
The instance of the root component class.
The DebugElement associated with the root element of this component.
The ElementRef for the element at the root of the component.
The native element at the root of the component.
Trigger component destruction.
Trigger a change detection cycle for the component.
The instance of the root component class.
The DebugElement associated with the root element of this component.
The ElementRef for the element at the root of the component.
The native element at the root of the component.
Builds a ComponentFixture for use in component level tests.
Builds and returns a ComponentFixture.
Overrides the directives from the component ViewMetadata.
Overrides one or more injectables configured via providers metadata property of a directive
or
component.
Very useful when certain providers need to be mocked out.
The providers specified via this method are appended to the existing providers causing the
duplicated providers to
be overridden.
Overrides only the html of a ComponentMetadata. All the other properties of the component's ViewMetadata are preserved.
Overrides a component's ViewMetadata.
Overrides one or more injectables configured via providers metadata property of a directive
or
component.
Very useful when certain providers need to be mocked out.
The providers specified via this method are appended to the existing providers causing the
duplicated providers to
be overridden.
Returns the value of the executed function.
Allows injecting dependencies in beforeEach() and it().
Example:
beforeEach(inject([Dependency, AClass], (dep, object) => {
// some code that uses `dep` and `object`
// ...
}));
it('...', inject([AClass], (object) => {
object.doSomething();
expect(...);
})
Notes:
it('...', @Inject (object: AClass, async: AsyncTestCompleter) => { ... });Allows injecting dependencies in beforeEach() and it(). The test must return
a promise which will resolve when all asynchronous activity is complete.
Example:
it('...', injectAsync([AClass], (object) => {
return object.doSomething().then(() => {
expect(...);
});
})
Reset the providers for the test injector.
Set the providers that the test injector should use. These should be providers common to every test in the suite.
This may only be called once, to set up the common providers for the current test
suite on teh current platform. If you absolutely need to change the providers,
first use resetBaseTestProviders.
Test Providers for individual platforms are available from
'angular2/platform/testing/
Signature for any simple testing function.
Signature for an asynchronous test function which takes a
done callback.
Signature for a synchronous test function (no arguments).
Run a function (with an optional asynchronous callback) after each test case.
See http://jasmine.github.io/ for more details.
{@example testing/ts/testing.ts region='afterEach'}
See fdescribe.
Group test cases together under a common description prefix.
See http://jasmine.github.io/ for more details.
{@example testing/ts/testing.ts region='describeIt'}
Like describe, but instructs the test runner to only run the test cases in this group. This is useful for debugging.
See http://jasmine.github.io/ for more details.
{@example testing/ts/testing.ts region='fdescribe'}
Like describe, but instructs the test runner to exclude this group of test cases from execution. This is useful for debugging, or for excluding broken tests until they can be fixed.
See http://jasmine.github.io/ for more details.
{@example testing/ts/testing.ts region='xdescribe'}
Wrapper around Jasmine beforeEach function.
beforeEach may be used with the inject function to fetch dependencies.
The test will automatically wait for any asynchronous calls inside the
injected test function to complete.
See http://jasmine.github.io/ for more details.
{@example testing/ts/testing.ts region='beforeEach'}
Allows overriding default providers of the test injector, which are defined in test_injector.js.
The given function must return a list of DI providers.
{@example testing/ts/testing.ts region='beforeEachProviders'}
Like it, but instructs the test runner to only run this test. Useful for debugging.
Wrapper around Jasmine fit function. See http://jasmine.github.io/ for more details.
{@example testing/ts/testing.ts region='fit'}
See fit.
Define a single test case with the given test name and execution function.
The test function can be either a synchronous function, an asynchronous function that takes a completion callback, or an injected function created via inject or injectAsync. The test will automatically wait for any asynchronous calls inside the injected test function to complete.
Wrapper around Jasmine it function. See http://jasmine.github.io/ for more details.
{@example testing/ts/testing.ts region='describeIt'}
Like it, but instructs the test runner to exclude this test entirely. Useful for debugging or for excluding broken tests until they can be fixed.
Wrapper around Jasmine xit function. See http://jasmine.github.io/ for more details.
{@example testing/ts/testing.ts region='xit'}
Injectable completer that allows signaling completion of an asynchronous test. Used internally.
Mechanism to run beforeEach() functions of Angular tests.
Note: Jasmine own beforeEach is used by this library to handle DI providers.
By chaining the spy with and.callFake, all calls to the spy will delegate to the supplied function.
By chaining the spy with and.returnValue, all calls to the function will return a specific value.
removes all recorded calls
Allows overriding default providers defined in test_injector.js.
The given function must return a list of DI providers.
Example:
beforeEachProviders(() => [ provide(Compiler, {useClass: MockCompiler}), provide(SomeToken, {useValue: myValue}), ]);
Use UpgradeAdapter to allow AngularJS v1 and Angular v2 to coexist in a single application.
The UpgradeAdapter allows:
When reasoning about how a hybrid application works it is useful to have a mental model which describes what is happening and explains what is happening at the lowest level.
$apply().``` var adapter = new UpgradeAdapter(); var module = angular.module('myExample', []); module.directive('ng2', adapter.downgradeNg2Component(Ng2));
module.directive('ng1', function() { return { scope: { title: '=' }, template: 'ng1Hello {{title}}!' }; });
Adds a provider to the top level environment of a hybrid AngularJS v1 / Angular v2 application.
In hybrid AngularJS v1 / Angular v2 application, there is no one root Angular v2 component, for this reason we provide an application global way of registering providers which is consistent with single global injection in AngularJS v1.
``` class Greeter { greet(name) { alert('Hello ' + name + '!'); } }
Bootstrap a hybrid AngularJS v1 / Angular v2 application.
This bootstrap method is a direct replacement (takes same arguments) for AngularJS v1
bootstrap method. Unlike
AngularJS v1, this bootstrap is asynchronous.
``` var adapter = new UpgradeAdapter(); var module = angular.module('myExample', []); module.directive('ng2', adapter.downgradeNg2Component(Ng2));
module.directive('ng1', function() { return { scope: { title: '=' }, template: 'ng1Hello {{title}}!' }; });
Allows Angular v2 Component to be used from AngularJS v1.
Use downgradeNg2Component to create an AngularJS v1 Directive Definition Factory from
Angular v2 Component. The adapter will bootstrap Angular v2 component from within the
AngularJS v1 template.
<comp name="World"><comp greeting="Hello {{name}}!"><comp [name]="username"><comp (close)="doSomething()">``` var adapter = new UpgradeAdapter(); var module = angular.module('myExample', []); module.directive('greet', adapter.downgradeNg2Component(Greeter));
Allows Angular v2 service to be accessible from AngularJS v1.
class Example {
}
var adapter = new UpgradeAdapter();
adapter.addProvider(Example);
var module = angular.module('myExample', []);
module.factory('example', adapter.downgradeNg2Provider(Example));
adapter.bootstrap(document.body, ['myExample']).ready((ref) => {
var example: Example = ref.ng1Injector.get('example');
});
Allows AngularJS v1 Component to be used from Angular v2.
Use upgradeNg1Component to create an Angular v2 component from AngularJS v1 Component
directive. The adapter will bootstrap AngularJS v1 component from within the Angular v2
template.
<comp name="World"><comp greeting="Hello {{name}}!"><comp [name]="username"><comp (close)="doSomething()">compile: not supported because the host element is owned by Angular v2, which does
not allow modifying DOM structure during compilation.controller: supported. (NOTE: injection of $attrs and $transclude is not supported.)require: supported.restrict: must be set to 'E'.scope: supported.template: supported.templateUrl: supported.terminal: ignored.transclude: supported.``` var adapter = new UpgradeAdapter(); var module = angular.module('myExample', []);
module.directive('greet', function() { return { scope: {salutation: '=', name: '=' }, template: '{{salutation}} {{name}}! - ' }; });
module.directive('ng2', adapter.downgradeNg2Component(Ng2));
Allows AngularJS v1 service to be accessible from Angular v2.
``` class Login { ... } class Server { ... }
Use UgradeAdapterRef to control a hybrid AngularJS v1 / Angular v2 application.
Dispose of running hybrid AngularJS v1 / Angular v2 application.
Register a callback function which is notified upon successful hybrid AngularJS v1 / Angular v2 application has been bootstrapped.
The ready callback function is invoked inside the Angular v2 zone, therefore it does not
require a call to $apply().
Initializes the given channel and attaches a new ClientMessageBroker to it.
Initializes the given channel and attaches a new ClientMessageBroker to it.
Returns the value from the StringMap if present. Otherwise returns null
Message Bus is a low level API used to communicate between the UI and the background. Communication is based on a channel abstraction. Messages published in a given channel to one MessageBusSink are received on the same channel by the corresponding MessageBusSource.
Assigns this bus to the given zone. Any callbacks attached to channels where runInZone was set to true on initialization will be executed in the given zone.
Returns an EventEmitter that emits every time a message is received on the given channel.
Sets up a new channel on the MessageBus. MUST be called before calling from or to on the channel. If runInZone is true then the source will emit events inside the angular zone and the sink will buffer messages and send only once the zone exits. if runInZone is false then the source will emit events inside the global zone and the sink will send messages immediately.
Returns an EventEmitter for the given channel To publish methods to that channel just call next (or add in dart) on the returned emitter
Assigns this sink to the given zone. Any channels which are initialized with runInZone set to true will wait for the given zone to exit before sending messages.
Sets up a new channel on the MessageBusSink. MUST be called before calling to on the channel. If runInZone is true the sink will buffer messages and send only once the zone exits. if runInZone is false the sink will send messages immediatly.
Returns an EventEmitter for the given channel To publish methods to that channel just call next (or add in dart) on the returned emitter
Assigns this source to the given zone. Any channels which are initialized with runInZone set to true will emit events that will be executed within the given zone.
Returns an EventEmitter that emits every time a message is received on the given channel.
Sets up a new channel on the MessageBusSource. MUST be called before calling from on the channel. If runInZone is true then the source will emit events inside the angular zone. if runInZone is false then the source will emit events inside the global zone.
All channels used by angular's WebWorker components are listed here. You should not use these channels in your application code.
A TypeScript implementation of MessageBus for communicating via JavaScript's postMessage API.
Helper class that wraps a channel's EventEmitter and keeps track of if it should run in the zone.
Initializes the given channel and attaches a new ServiceMessageBroker to it.
Helper class for UIComponents that allows components to register methods. If a registered method message is received from the broker on the worker, the UIMessageBroker deserializes its arguments and calls the registered method. If that method returns a promise, the UIMessageBroker returns the result to the worker.
Implementation of compiler/xhr that relays XHR requests to the UI side where they are sent and the result is proxied back to the worker
Dispatch an event on the document
Get the caret position within a given node. Some hackery in here to make sure this works in all browsers
These are global events that get passed around. Currently we use the document to do this.
Add event listener at window level
Remove a node since we are done with it
Set caret position in a given node
Loop through node events and add listeners
For a given node, add an event listener based on the given attribute. The attribute must match the Angular pattern for event handlers (i.e. either (event)='blah()' or on-event='blah'
Loop through replay strategies and call replayEvents functions. In most cases there will be only one replay strategy, but users may want to add multiple in some cases with the remaining events from one feeding into the next. Note that as with startListening() above, there are very little safety checks here in getting the replayEvents fn because those checks are in normalize.ts.
Prepare for freeze by adding elements to the DOM and adding an event handler
This listen strategy will look for a specific attribute which contains all the elements that a given element is listening to. For ex.
This is function called at each node while walking DOM. Will add node event if events defined on element.
This listen strategy will look for a specific attribute which contains all the elements that a given element is listening to.
This is from Crockford to walk the DOM (http: //whlp.ly/1Ii6YbR). Recursively walk DOM tree and execute input param function at each node.
This listen strategy uses a list of selectors maped to events. For example: { 'input[type="text"],textarea': ['focusin', 'focusout'], 'button': ['click'] }
Idea here is simple. If debugging turned on and this module exists, we log various things that happen in preboot. The calling code only references a number (keys in logMap) to a handling function. By doing this, we are able to cut down on the amount of logging code in preboot when no in debug mode.
Once bootstrap has completed, we replay events, switch buffer and then cleanup
Initialization is really simple. Just save the options and set the window object. Most stuff happens with start() * To call multiple times like init('app1', {}), init('app2', {})
Get function to run once window has loaded
Resume the completion process; if complete already called, call it again right away
Start preboot by starting to record events
this replay strategy assumes that the browser did not blow away the server generated HTML and that the elements in memory for preboot can be used to replay the events.
any events that could not be replayed for whatever reason are returned.
This replay strategy assumes that the browser completely re-rendered the page so reboot will need to find the element in the new browser rendered DOM that matches the element it has in memory.
Any events that could not be replayed for whatever reason are returned.
Generate browser code as a string for preboot based on the input options
Generate browser code as a readable stream for preboot based on the input options
We want to use the browserify ignore functionality so that any code modules that are not being used are stubbed out. So, for example, if in the preboot options the only listen strategy is selectors, then the event_bindings and attributes strategies will be stubbed out (meaing the refs will be {})
Normalize options so user can enter shorthand and it is expanded as appropriate for the browser code
Make sure freeze options are array of FreezeStrategy objects. We have a set of base styles that are used for freeze (i.e. for overaly and spinner), but these can be overriden
Make sure that the listen option is an array of ListenStrategy objects so client side doesn't need to worry about conversions
Just set default pauseEvent if doesn't exist
Presets are modifications to options. In the future, we may be simple presets like 'angular' which add all the listeners and replay.
Make sure replay options are array of ReplayStrategy objects. So, callers can just pass in simple string, but converted to an array before passed into client side preboot.
Set default resumeEvent if doesn't exist
Stringify an object and include functions
Applies a set of decorators to a target object.
An array of decorators.
The target object.
The result of applying the provided decorators.
Applies a set of decorators to a property of a target object.
An array of decorators.
The target object.
(Optional) The property key to decorate.
A property descriptor
Define a unique metadata entry on the target.
A key used to store and retrieve metadata.
A value that contains attached metadata.
The target object on which to define metadata.
Define a unique metadata entry on the target.
A key used to store and retrieve metadata.
A value that contains attached metadata.
The target object on which to define metadata.
(Optional) The property key for the target.
Deletes the metadata entry from the target object with the provided key.
A key used to store and retrieve metadata.
The target object on which the metadata is defined.
true if the metadata entry was found and deleted; otherwise, false.
Deletes the metadata entry from the target object with the provided key.
A key used to store and retrieve metadata.
The target object on which the metadata is defined.
(Optional) The property key for the target.
true if the metadata entry was found and deleted; otherwise, false.
Gets the metadata value for the provided metadata key on the target object or its prototype chain.
A key used to store and retrieve metadata.
The target object on which the metadata is defined.
The metadata value for the metadata key if found; otherwise, undefined.
Gets the metadata value for the provided metadata key on the target object or its prototype chain.
A key used to store and retrieve metadata.
The target object on which the metadata is defined.
(Optional) The property key for the target.
The metadata value for the metadata key if found; otherwise, undefined.
Gets the metadata keys defined on the target object or its prototype chain.
The target object on which the metadata is defined.
An array of unique metadata keys.
Gets the metadata keys defined on the target object or its prototype chain.
The target object on which the metadata is defined.
(Optional) The property key for the target.
An array of unique metadata keys.
Gets the metadata value for the provided metadata key on the target object.
A key used to store and retrieve metadata.
The target object on which the metadata is defined.
The metadata value for the metadata key if found; otherwise, undefined.
Gets the metadata value for the provided metadata key on the target object.
A key used to store and retrieve metadata.
The target object on which the metadata is defined.
(Optional) The property key for the target.
The metadata value for the metadata key if found; otherwise, undefined.
Gets the unique metadata keys defined on the target object.
The target object on which the metadata is defined.
An array of unique metadata keys.
Gets the unique metadata keys defined on the target object.
The target object on which the metadata is defined.
(Optional) The property key for the target.
An array of unique metadata keys.
Gets a value indicating whether the target object or its prototype chain has the provided metadata key defined.
A key used to store and retrieve metadata.
The target object on which the metadata is defined.
true if the metadata key was defined on the target object or its prototype chain; otherwise, false.
Gets a value indicating whether the target object or its prototype chain has the provided metadata key defined.
A key used to store and retrieve metadata.
The target object on which the metadata is defined.
(Optional) The property key for the target.
true if the metadata key was defined on the target object or its prototype chain; otherwise, false.
Gets a value indicating whether the target object has the provided metadata key defined.
A key used to store and retrieve metadata.
The target object on which the metadata is defined.
true if the metadata key was defined on the target object; otherwise, false.
Gets a value indicating whether the target object has the provided metadata key defined.
A key used to store and retrieve metadata.
The target object on which the metadata is defined.
(Optional) The property key for the target.
true if the metadata key was defined on the target object; otherwise, false.
A default metadata decorator factory that can be used on a class, class member, or parameter.
The key for the metadata entry.
The value for the metadata entry.
A decorator function.
a handler for each value emitted by the observable
a promise that either resolves on observable completion or rejects with the handled error
Registers handlers for handling emitted values, error and completions from the observable, and executes the observable's subscriber function, which will take action to set up the underlying data stream
(optional) either an observer defining all functions to be called, or the first of three possible handlers, which is the handler for each value emitted from the observable.
(optional) a handler for a terminal event resulting from an error. If no error handler is provided, the error will be thrown as unhandled
(optional) a handler for a terminal event resulting from successful completion.
a subscription reference to the registered handlers
a handler for each value emitted by the observable
a promise that either resolves on observable completion or rejects with the handled error
Registers handlers for handling emitted values, error and completions from the observable, and executes the observable's subscriber function, which will take action to set up the underlying data stream
(optional) either an observer defining all functions to be called, or the first of three possible handlers, which is the handler for each value emitted from the observable.
(optional) a handler for a terminal event resulting from an error. If no error handler is provided, the error will be thrown as unhandled
(optional) a handler for a terminal event resulting from successful completion.
a subscription reference to the registered handlers
We need this JSDoc comment for affecting ESDoc.
A flag to indicate whether this Subscription has already been unsubscribed.
Adds a tear down to be called during the unsubscribe() of this Subscription.
If the tear down being added is a subscription that is already
unsubscribed, is the same reference add is being called on, or is
Subscription.EMPTY, it will not be added.
If this subscription is already in an isUnsubscribed state, the passed
tear down logic will be executed immediately.
The additional logic to execute on teardown.
Returns the Subscription used or created to be
added to the inner subscriptions list. This Subscription can be used with
remove() to remove the passed teardown logic from the inner subscriptions
list.
The Observer callback to receive a valueless notification of type
complete from the Observable. Notifies the Observer that the Observable
has finished sending push-based notifications.
The Observer callback to receive notifications of type next from
the Observable, with a value. The Observable may call this method 0 or more
times.
Removes a Subscription from the internal list of subscriptions that will unsubscribe during the unsubscribe process of this Subscription.
The subscription to remove.
A static factory for a Subscriber, given a (potentially partial) definition of an Observer.
A Subscriber wrapping the (partially defined) Observer represented by the given arguments.
We need this JSDoc comment for affecting ESDoc.
Creates a new Observable that will execute the specified function when a Subscriber subscribes to it.
Creates an Observable with custom logic given in
the subscribe function.

create converts a subscribe function to an actual Observable. This is
equivalent to calling the Observable constructor. Write the subscribe
function so that it behaves as an Observable: It should invoke the
Subscriber's next, error, and complete methods following the
Observable Contract. A well-formed Observable must invoke either the
Subscriber's complete method exactly once or its error method exactly
once, and invoke nothing else thereafter.
Most of the times you should not need to use create because existing
creation operators (together with instance combination operators) allow you
to create an Observable for most of the use cases. However, create is
low-level and is able to create any Observable.
An Observable that, when subscribed, will execute the specified function.
An interface for a consumer of push-based notifications delivered by an Observable.
interface Observer<T> {
isUnsubscribed?: boolean;
next: (value: T) => void;
error: (err: any) => void;
complete: () => void;
}
An object conforming to the Observer interface is usually
given to the observable.subscribe(observer) method, and the Observable will
call the Observer's next(value) method to provide notifications. A
well-behaved Observable will call an Observer's complete() method exactly
once or the Observer's error(err) method exactly once, as the last
notification delivered.
An optional flag to indicate whether this Observer, when used as a subscriber, has already been unsubscribed from its Observable.
The callback to receive a valueless notification of type complete from
the Observable. Notifies the Observer that the Observable has finished
sending push-based notifications.
The callback to receive notifications of type error from the Observable,
with an attached Error. Notifies the Observer that the Observable
has experienced an error condition.
The error exception.
The callback to receive notifications of type next from the Observable,
with a value. The Observable may call this method 0 or more times.
The next value.
An execution context and a data structure to order tasks and schedule their
execution. Provides a notion of (potentially virtual) time, through the
now() getter method.
Each unit of work in a Scheduler is called an Action.
interface Scheduler {
now(): number;
schedule(work, delay?, state?): Subscription;
flush(): void;
active: boolean;
actions: Action[];
scheduledId: number;
}
The queue of scheduled actions as an array.
A flag to indicate whether the Scheduler is currently executing a batch of queued actions.
An internal ID used to track the latest asynchronous task such as those
coming from setTimeout, setInterval, requestAnimationFrame, and
others.
Prompt the Scheduler to execute all of its queued actions, therefore clearing its queue.
A getter method that returns a number representing the current time (at the time this function was called) according to the scheduler's own internal clock.
A number that represents the current time. May or may not have a relation to wall-clock time. May or may not refer to a time unit (e.g. milliseconds).
Schedules a function, work, for execution. May happen at some point in
the future, according to the delay parameter, if specified. May be passed
some context object, state, which will be passed to the work function.
The given arguments will be processed an stored as an Action object in a queue of actions.
A function representing a task, or some unit of work to be executed by the Scheduler.
A subscription in order to be able to unsubscribe the scheduled work.
Represents a push-based event or value that an Observable can emit.
This class is particularly useful for operators that manage notifications,
like materialize, dematerialize, observeOn, and
others. Besides wrapping the actual delivered value, it also annotates it
with metadata of, for instance, what type of push message it is (next,
error, or complete).
Takes an Observer or its individual callback functions, and calls observe
or do methods accordingly.
An Observer or
the next callback.
Given some Observer callbacks, deliver the value represented by the current Notification to the correctly corresponding callback.
An Observer next callback.
Delivers to the given observer the value wrapped by this Notification.
Returns a simple Observable that just delivers the notification represented by this Notification instance.
A shortcut to create a Notification instance of the type complete.
The valueless "complete" Notification.
A shortcut to create a Notification instance of the type error from a
given error.
The "error" Notification representing the argument.
A shortcut to create a Notification instance of the type next from a
given value.
The next value.
The "next" Notification representing the argument.
A representation of any set of values over any amount of time. This the most basic building block of RxJS.
the function that is called when the Observable is
initially subscribed to. This function is given a Subscriber, to which new values
can be nexted, or an error method can be called to raise an error, or
complete can be called to notify of a successful completion.
An interop point defined by the es7-observable spec https://github.com/zenparsing/es-observable
this instance of the observable
a handler for each value emitted by the observable
a promise that either resolves on observable completion or rejects with the handled error
Creates a new Observable, with this Observable as the source, and the passed operator defined as the new observable's operator.
the operator defining the operation to take on the observable
a new observable with the Operator applied
Registers handlers for handling emitted values, error and completions from the observable, and executes the observable's subscriber function, which will take action to set up the underlying data stream
(optional) either an observer defining all functions to be called, or the first of three possible handlers, which is the handler for each value emitted from the observable.
(optional) a handler for a terminal event resulting from an error. If no error handler is provided, the error will be thrown as unhandled
(optional) a handler for a terminal event resulting from successful completion.
a subscription reference to the registered handlers
Creates a new cold Observable by calling the Observable constructor
a new cold observable
We need this JSDoc comment for affecting ESDoc.
A flag to indicate whether this Subscription has already been unsubscribed.
Adds a tear down to be called during the unsubscribe() of this Subscription.
If the tear down being added is a subscription that is already
unsubscribed, is the same reference add is being called on, or is
Subscription.EMPTY, it will not be added.
If this subscription is already in an isUnsubscribed state, the passed
tear down logic will be executed immediately.
The additional logic to execute on teardown.
Returns the Subscription used or created to be
added to the inner subscriptions list. This Subscription can be used with
remove() to remove the passed teardown logic from the inner subscriptions
list.
The Observer callback to receive a valueless notification of type
complete from the Observable. Notifies the Observer that the Observable
has finished sending push-based notifications.
The Observer callback to receive notifications of type next from
the Observable, with a value. The Observable may call this method 0 or more
times.
Removes a Subscription from the internal list of subscriptions that will unsubscribe during the unsubscribe process of this Subscription.
The subscription to remove.
A static factory for a Subscriber, given a (potentially partial) definition of an Observer.
A Subscriber wrapping the (partially defined) Observer represented by the given arguments.
a handler for each value emitted by the observable
a promise that either resolves on observable completion or rejects with the handled error
Registers handlers for handling emitted values, error and completions from the observable, and executes the observable's subscriber function, which will take action to set up the underlying data stream
(optional) either an observer defining all functions to be called, or the first of three possible handlers, which is the handler for each value emitted from the observable.
(optional) a handler for a terminal event resulting from an error. If no error handler is provided, the error will be thrown as unhandled
(optional) a handler for a terminal event resulting from successful completion.
a subscription reference to the registered handlers
a handler for each value emitted by the observable
a promise that either resolves on observable completion or rejects with the handled error
Registers handlers for handling emitted values, error and completions from the observable, and executes the observable's subscriber function, which will take action to set up the underlying data stream
(optional) either an observer defining all functions to be called, or the first of three possible handlers, which is the handler for each value emitted from the observable.
(optional) a handler for a terminal event resulting from an error. If no error handler is provided, the error will be thrown as unhandled
(optional) a handler for a terminal event resulting from successful completion.
a subscription reference to the registered handlers
a handler for each value emitted by the observable
a promise that either resolves on observable completion or rejects with the handled error
Registers handlers for handling emitted values, error and completions from the observable, and executes the observable's subscriber function, which will take action to set up the underlying data stream
(optional) either an observer defining all functions to be called, or the first of three possible handlers, which is the handler for each value emitted from the observable.
(optional) a handler for a terminal event resulting from an error. If no error handler is provided, the error will be thrown as unhandled
(optional) a handler for a terminal event resulting from successful completion.
a subscription reference to the registered handlers
A flag to indicate whether this Subscription has already been unsubscribed.
Adds a tear down to be called during the unsubscribe() of this Subscription.
If the tear down being added is a subscription that is already
unsubscribed, is the same reference add is being called on, or is
Subscription.EMPTY, it will not be added.
If this subscription is already in an isUnsubscribed state, the passed
tear down logic will be executed immediately.
The additional logic to execute on teardown.
Returns the Subscription used or created to be
added to the inner subscriptions list. This Subscription can be used with
remove() to remove the passed teardown logic from the inner subscriptions
list.
The Observer callback to receive a valueless notification of type
complete from the Observable. Notifies the Observer that the Observable
has finished sending push-based notifications.
The Observer callback to receive notifications of type next from
the Observable, with a value. The Observable may call this method 0 or more
times.
Removes a Subscription from the internal list of subscriptions that will unsubscribe during the unsubscribe process of this Subscription.
The subscription to remove.
A static factory for a Subscriber, given a (potentially partial) definition of an Observer.
A Subscriber wrapping the (partially defined) Observer represented by the given arguments.
We need this JSDoc comment for affecting ESDoc.
Adds a tear down to be called during the unsubscribe() of this Subscription.
If the tear down being added is a subscription that is already
unsubscribed, is the same reference add is being called on, or is
Subscription.EMPTY, it will not be added.
If this subscription is already in an isUnsubscribed state, the passed
tear down logic will be executed immediately.
The additional logic to execute on teardown.
Returns the Subscription used or created to be
added to the inner subscriptions list. This Subscription can be used with
remove() to remove the passed teardown logic from the inner subscriptions
list.
Removes a Subscription from the internal list of subscriptions that will unsubscribe during the unsubscribe process of this Subscription.
The subscription to remove.
We need this JSDoc comment for affecting ESDoc.
A flag to indicate whether this Subscription has already been unsubscribed.
Adds a tear down to be called during the unsubscribe() of this Subscription.
If the tear down being added is a subscription that is already
unsubscribed, is the same reference add is being called on, or is
Subscription.EMPTY, it will not be added.
If this subscription is already in an isUnsubscribed state, the passed
tear down logic will be executed immediately.
The additional logic to execute on teardown.
Returns the Subscription used or created to be
added to the inner subscriptions list. This Subscription can be used with
remove() to remove the passed teardown logic from the inner subscriptions
list.
Removes a Subscription from the internal list of subscriptions that will unsubscribe during the unsubscribe process of this Subscription.
The subscription to remove.
A static factory for a Subscriber, given a (potentially partial) definition of an Observer.
A Subscriber wrapping the (partially defined) Observer represented by the given arguments.
Implements the Observer interface and extends the
Subscription class. While the Observer is the public API for
consuming the values of an Observable, all Observers get converted to
a Subscriber, in order to provide Subscription-like capabilities such as
unsubscribe. Subscriber is a common type in RxJS, and crucial for
implementing operators, but it is rarely used as a public API.
A flag to indicate whether this Subscription has already been unsubscribed.
Adds a tear down to be called during the unsubscribe() of this Subscription.
If the tear down being added is a subscription that is already
unsubscribed, is the same reference add is being called on, or is
Subscription.EMPTY, it will not be added.
If this subscription is already in an isUnsubscribed state, the passed
tear down logic will be executed immediately.
The additional logic to execute on teardown.
Returns the Subscription used or created to be
added to the inner subscriptions list. This Subscription can be used with
remove() to remove the passed teardown logic from the inner subscriptions
list.
The Observer callback to receive a valueless notification of type
complete from the Observable. Notifies the Observer that the Observable
has finished sending push-based notifications.
The Observer callback to receive notifications of type next from
the Observable, with a value. The Observable may call this method 0 or more
times.
Removes a Subscription from the internal list of subscriptions that will unsubscribe during the unsubscribe process of this Subscription.
The subscription to remove.
A static factory for a Subscriber, given a (potentially partial) definition of an Observer.
A Subscriber wrapping the (partially defined) Observer represented by the given arguments.
Represents a disposable resource, such as the execution of an Observable. A
Subscription has one important method, unsubscribe, that takes no argument
and just disposes the resource held by the subscription.
Additionally, subscriptions may be grouped together through the add()
method, which will attach a child Subscription to the current Subscription.
When a Subscription is unsubscribed, all its children (and its grandchildren)
will be unsubscribed as well.
A flag to indicate whether this Subscription has already been unsubscribed.
Adds a tear down to be called during the unsubscribe() of this Subscription.
If the tear down being added is a subscription that is already
unsubscribed, is the same reference add is being called on, or is
Subscription.EMPTY, it will not be added.
If this subscription is already in an isUnsubscribed state, the passed
tear down logic will be executed immediately.
The additional logic to execute on teardown.
Returns the Subscription used or created to be
added to the inner subscriptions list. This Subscription can be used with
remove() to remove the passed teardown logic from the inner subscriptions
list.
Removes a Subscription from the internal list of subscriptions that will unsubscribe during the unsubscribe process of this Subscription.
The subscription to remove.
Disposes the resources held by the subscription. May, for instance, cancel an ongoing Observable execution or cancel any other type of work that started when the Subscription was created.
We need this JSDoc comment for affecting ESDoc.
An interop point defined by the es7-observable spec https://github.com/zenparsing/es-observable
this instance of the observable
a handler for each value emitted by the observable
a promise that either resolves on observable completion or rejects with the handled error
Creates a new Observable, with this Observable as the source, and the passed operator defined as the new observable's operator.
the operator defining the operation to take on the observable
a new observable with the Operator applied
Registers handlers for handling emitted values, error and completions from the observable, and executes the observable's subscriber function, which will take action to set up the underlying data stream
(optional) either an observer defining all functions to be called, or the first of three possible handlers, which is the handler for each value emitted from the observable.
(optional) a handler for a terminal event resulting from an error. If no error handler is provided, the error will be thrown as unhandled
(optional) a handler for a terminal event resulting from successful completion.
a subscription reference to the registered handlers
We need this JSDoc comment for affecting ESDoc.
An interop point defined by the es7-observable spec https://github.com/zenparsing/es-observable
this instance of the observable
a handler for each value emitted by the observable
a promise that either resolves on observable completion or rejects with the handled error
Creates a new Observable, with this Observable as the source, and the passed operator defined as the new observable's operator.
the operator defining the operation to take on the observable
a new observable with the Operator applied
Registers handlers for handling emitted values, error and completions from the observable, and executes the observable's subscriber function, which will take action to set up the underlying data stream
(optional) either an observer defining all functions to be called, or the first of three possible handlers, which is the handler for each value emitted from the observable.
(optional) a handler for a terminal event resulting from an error. If no error handler is provided, the error will be thrown as unhandled
(optional) a handler for a terminal event resulting from successful completion.
a subscription reference to the registered handlers
Creates an Observable that emits some values you specify as arguments, immediately one after the other, and then emits a complete notification.
Emits the arguments you provide, then completes.

This static operator is useful for creating a simple Observable that only
emits the arguments given, and the complete notification thereafter. It can
be used for composing with other Observables, such as with concat.
By default, it uses a null Scheduler, which means the next
notifications are sent synchronously, although with a different Scheduler
it is possible to determine when those notifications will be delivered.
An Observable that emits each given input value.
Creates an Observable that emits some values you specify as arguments, immediately one after the other, and then emits a complete notification.
Emits the arguments you provide, then completes.

This static operator is useful for creating a simple Observable that only
emits the arguments given, and the complete notification thereafter. It can
be used for composing with other Observables, such as with concat.
By default, it uses a null Scheduler, which means the next
notifications are sent synchronously, although with a different Scheduler
it is possible to determine when those notifications will be delivered.
An Observable that emits each given input value.
Creates an Observable that emits some values you specify as arguments, immediately one after the other, and then emits a complete notification.
Emits the arguments you provide, then completes.

This static operator is useful for creating a simple Observable that only
emits the arguments given, and the complete notification thereafter. It can
be used for composing with other Observables, such as with concat.
By default, it uses a null Scheduler, which means the next
notifications are sent synchronously, although with a different Scheduler
it is possible to determine when those notifications will be delivered.
An Observable that emits each given input value.
Creates an Observable that emits some values you specify as arguments, immediately one after the other, and then emits a complete notification.
Emits the arguments you provide, then completes.

This static operator is useful for creating a simple Observable that only
emits the arguments given, and the complete notification thereafter. It can
be used for composing with other Observables, such as with concat.
By default, it uses a null Scheduler, which means the next
notifications are sent synchronously, although with a different Scheduler
it is possible to determine when those notifications will be delivered.
An Observable that emits each given input value.
Creates an Observable that emits some values you specify as arguments, immediately one after the other, and then emits a complete notification.
Emits the arguments you provide, then completes.

This static operator is useful for creating a simple Observable that only
emits the arguments given, and the complete notification thereafter. It can
be used for composing with other Observables, such as with concat.
By default, it uses a null Scheduler, which means the next
notifications are sent synchronously, although with a different Scheduler
it is possible to determine when those notifications will be delivered.
An Observable that emits each given input value.
Creates an Observable that emits some values you specify as arguments, immediately one after the other, and then emits a complete notification.
Emits the arguments you provide, then completes.

This static operator is useful for creating a simple Observable that only
emits the arguments given, and the complete notification thereafter. It can
be used for composing with other Observables, such as with concat.
By default, it uses a null Scheduler, which means the next
notifications are sent synchronously, although with a different Scheduler
it is possible to determine when those notifications will be delivered.
An Observable that emits each given input value.
Creates an Observable that emits some values you specify as arguments, immediately one after the other, and then emits a complete notification.
Emits the arguments you provide, then completes.

This static operator is useful for creating a simple Observable that only
emits the arguments given, and the complete notification thereafter. It can
be used for composing with other Observables, such as with concat.
By default, it uses a null Scheduler, which means the next
notifications are sent synchronously, although with a different Scheduler
it is possible to determine when those notifications will be delivered.
An Observable that emits each given input value.
We need this JSDoc comment for affecting ESDoc.
An interop point defined by the es7-observable spec https://github.com/zenparsing/es-observable
this instance of the observable
a handler for each value emitted by the observable
a promise that either resolves on observable completion or rejects with the handled error
Creates a new Observable, with this Observable as the source, and the passed operator defined as the new observable's operator.
the operator defining the operation to take on the observable
a new observable with the Operator applied
Registers handlers for handling emitted values, error and completions from the observable, and executes the observable's subscriber function, which will take action to set up the underlying data stream
(optional) either an observer defining all functions to be called, or the first of three possible handlers, which is the handler for each value emitted from the observable.
(optional) a handler for a terminal event resulting from an error. If no error handler is provided, the error will be thrown as unhandled
(optional) a handler for a terminal event resulting from successful completion.
a subscription reference to the registered handlers
Converts a callback API to a function that returns an Observable.
Give it a function f of type f(x, callback) and
it will return a function g that when called as g(x) will output an
Observable.
bindCallback is not an operator because its input and output are not
Observables. The input is a function func with some parameters, but the
last parameter must be a callback function that func calls when it is
done. The output of bindCallback is a function that takes the same
parameters as func, except the last one (the callback). When the output
function is called with arguments, it will return an Observable where the
results will be delivered to.
A function which takes the arguments from the callback and maps those a value to emit on the output Observable.
A function which returns the Observable that delivers the same values the callback would deliver.
Converts a callback API to a function that returns an Observable.
Give it a function f of type f(x, callback) and
it will return a function g that when called as g(x) will output an
Observable.
bindCallback is not an operator because its input and output are not
Observables. The input is a function func with some parameters, but the
last parameter must be a callback function that func calls when it is
done. The output of bindCallback is a function that takes the same
parameters as func, except the last one (the callback). When the output
function is called with arguments, it will return an Observable where the
results will be delivered to.
A function which takes the arguments from the callback and maps those a value to emit on the output Observable.
A function which returns the Observable that delivers the same values the callback would deliver.
Converts a callback API to a function that returns an Observable.
Give it a function f of type f(x, callback) and
it will return a function g that when called as g(x) will output an
Observable.
bindCallback is not an operator because its input and output are not
Observables. The input is a function func with some parameters, but the
last parameter must be a callback function that func calls when it is
done. The output of bindCallback is a function that takes the same
parameters as func, except the last one (the callback). When the output
function is called with arguments, it will return an Observable where the
results will be delivered to.
A function which takes the arguments from the callback and maps those a value to emit on the output Observable.
A function which returns the Observable that delivers the same values the callback would deliver.
Converts a callback API to a function that returns an Observable.
Give it a function f of type f(x, callback) and
it will return a function g that when called as g(x) will output an
Observable.
bindCallback is not an operator because its input and output are not
Observables. The input is a function func with some parameters, but the
last parameter must be a callback function that func calls when it is
done. The output of bindCallback is a function that takes the same
parameters as func, except the last one (the callback). When the output
function is called with arguments, it will return an Observable where the
results will be delivered to.
A function which takes the arguments from the callback and maps those a value to emit on the output Observable.
A function which returns the Observable that delivers the same values the callback would deliver.
Converts a callback API to a function that returns an Observable.
Give it a function f of type f(x, callback) and
it will return a function g that when called as g(x) will output an
Observable.
bindCallback is not an operator because its input and output are not
Observables. The input is a function func with some parameters, but the
last parameter must be a callback function that func calls when it is
done. The output of bindCallback is a function that takes the same
parameters as func, except the last one (the callback). When the output
function is called with arguments, it will return an Observable where the
results will be delivered to.
A function which takes the arguments from the callback and maps those a value to emit on the output Observable.
A function which returns the Observable that delivers the same values the callback would deliver.
Converts a callback API to a function that returns an Observable.
Give it a function f of type f(x, callback) and
it will return a function g that when called as g(x) will output an
Observable.
bindCallback is not an operator because its input and output are not
Observables. The input is a function func with some parameters, but the
last parameter must be a callback function that func calls when it is
done. The output of bindCallback is a function that takes the same
parameters as func, except the last one (the callback). When the output
function is called with arguments, it will return an Observable where the
results will be delivered to.
A function which takes the arguments from the callback and maps those a value to emit on the output Observable.
A function which returns the Observable that delivers the same values the callback would deliver.
Converts a callback API to a function that returns an Observable.
Give it a function f of type f(x, callback) and
it will return a function g that when called as g(x) will output an
Observable.
bindCallback is not an operator because its input and output are not
Observables. The input is a function func with some parameters, but the
last parameter must be a callback function that func calls when it is
done. The output of bindCallback is a function that takes the same
parameters as func, except the last one (the callback). When the output
function is called with arguments, it will return an Observable where the
results will be delivered to.
A function which takes the arguments from the callback and maps those a value to emit on the output Observable.
A function which returns the Observable that delivers the same values the callback would deliver.
Converts a callback API to a function that returns an Observable.
Give it a function f of type f(x, callback) and
it will return a function g that when called as g(x) will output an
Observable.
bindCallback is not an operator because its input and output are not
Observables. The input is a function func with some parameters, but the
last parameter must be a callback function that func calls when it is
done. The output of bindCallback is a function that takes the same
parameters as func, except the last one (the callback). When the output
function is called with arguments, it will return an Observable where the
results will be delivered to.
A function which takes the arguments from the callback and maps those a value to emit on the output Observable.
A function which returns the Observable that delivers the same values the callback would deliver.
Converts a callback API to a function that returns an Observable.
Give it a function f of type f(x, callback) and
it will return a function g that when called as g(x) will output an
Observable.
bindCallback is not an operator because its input and output are not
Observables. The input is a function func with some parameters, but the
last parameter must be a callback function that func calls when it is
done. The output of bindCallback is a function that takes the same
parameters as func, except the last one (the callback). When the output
function is called with arguments, it will return an Observable where the
results will be delivered to.
A function which takes the arguments from the callback and maps those a value to emit on the output Observable.
A function which returns the Observable that delivers the same values the callback would deliver.
Converts a callback API to a function that returns an Observable.
Give it a function f of type f(x, callback) and
it will return a function g that when called as g(x) will output an
Observable.
bindCallback is not an operator because its input and output are not
Observables. The input is a function func with some parameters, but the
last parameter must be a callback function that func calls when it is
done. The output of bindCallback is a function that takes the same
parameters as func, except the last one (the callback). When the output
function is called with arguments, it will return an Observable where the
results will be delivered to.
A function which takes the arguments from the callback and maps those a value to emit on the output Observable.
A function which returns the Observable that delivers the same values the callback would deliver.
Converts a callback API to a function that returns an Observable.
Give it a function f of type f(x, callback) and
it will return a function g that when called as g(x) will output an
Observable.
bindCallback is not an operator because its input and output are not
Observables. The input is a function func with some parameters, but the
last parameter must be a callback function that func calls when it is
done. The output of bindCallback is a function that takes the same
parameters as func, except the last one (the callback). When the output
function is called with arguments, it will return an Observable where the
results will be delivered to.
A function which takes the arguments from the callback and maps those a value to emit on the output Observable.
A function which returns the Observable that delivers the same values the callback would deliver.
Converts a callback API to a function that returns an Observable.
Give it a function f of type f(x, callback) and
it will return a function g that when called as g(x) will output an
Observable.
bindCallback is not an operator because its input and output are not
Observables. The input is a function func with some parameters, but the
last parameter must be a callback function that func calls when it is
done. The output of bindCallback is a function that takes the same
parameters as func, except the last one (the callback). When the output
function is called with arguments, it will return an Observable where the
results will be delivered to.
A function which takes the arguments from the callback and maps those a value to emit on the output Observable.
A function which returns the Observable that delivers the same values the callback would deliver.
Converts a callback API to a function that returns an Observable.
Give it a function f of type f(x, callback) and
it will return a function g that when called as g(x) will output an
Observable.
bindCallback is not an operator because its input and output are not
Observables. The input is a function func with some parameters, but the
last parameter must be a callback function that func calls when it is
done. The output of bindCallback is a function that takes the same
parameters as func, except the last one (the callback). When the output
function is called with arguments, it will return an Observable where the
results will be delivered to.
A function which takes the arguments from the callback and maps those a value to emit on the output Observable.
A function which returns the Observable that delivers the same values the callback would deliver.
Converts a callback API to a function that returns an Observable.
Give it a function f of type f(x, callback) and
it will return a function g that when called as g(x) will output an
Observable.
bindCallback is not an operator because its input and output are not
Observables. The input is a function func with some parameters, but the
last parameter must be a callback function that func calls when it is
done. The output of bindCallback is a function that takes the same
parameters as func, except the last one (the callback). When the output
function is called with arguments, it will return an Observable where the
results will be delivered to.
A function which takes the arguments from the callback and maps those a value to emit on the output Observable.
A function which returns the Observable that delivers the same values the callback would deliver.
Converts a callback API to a function that returns an Observable.
Give it a function f of type f(x, callback) and
it will return a function g that when called as g(x) will output an
Observable.
bindCallback is not an operator because its input and output are not
Observables. The input is a function func with some parameters, but the
last parameter must be a callback function that func calls when it is
done. The output of bindCallback is a function that takes the same
parameters as func, except the last one (the callback). When the output
function is called with arguments, it will return an Observable where the
results will be delivered to.
A function which takes the arguments from the callback and maps those a value to emit on the output Observable.
A function which returns the Observable that delivers the same values the callback would deliver.
Converts a callback API to a function that returns an Observable.
Give it a function f of type f(x, callback) and
it will return a function g that when called as g(x) will output an
Observable.
bindCallback is not an operator because its input and output are not
Observables. The input is a function func with some parameters, but the
last parameter must be a callback function that func calls when it is
done. The output of bindCallback is a function that takes the same
parameters as func, except the last one (the callback). When the output
function is called with arguments, it will return an Observable where the
results will be delivered to.
A function which takes the arguments from the callback and maps those a value to emit on the output Observable.
A function which returns the Observable that delivers the same values the callback would deliver.
We need this JSDoc comment for affecting ESDoc.
An interop point defined by the es7-observable spec https://github.com/zenparsing/es-observable
this instance of the observable
a handler for each value emitted by the observable
a promise that either resolves on observable completion or rejects with the handled error
Creates a new Observable, with this Observable as the source, and the passed operator defined as the new observable's operator.
the operator defining the operation to take on the observable
a new observable with the Operator applied
Registers handlers for handling emitted values, error and completions from the observable, and executes the observable's subscriber function, which will take action to set up the underlying data stream
(optional) either an observer defining all functions to be called, or the first of three possible handlers, which is the handler for each value emitted from the observable.
(optional) a handler for a terminal event resulting from an error. If no error handler is provided, the error will be thrown as unhandled
(optional) a handler for a terminal event resulting from successful completion.
a subscription reference to the registered handlers
Converts a Node.js-style callback API to a function that returns an Observable.
It's just like bindCallback, but the
callback is expected to be of type callback(error, result).
bindNodeCallback is not an operator because its input and output are not
Observables. The input is a function func with some parameters, but the
last parameter must be a callback function that func calls when it is
done. The callback function is expected to follow Node.js conventions,
where the first argument to the callback is an error, while remaining
arguments are the callback result. The output of bindNodeCallback is a
function that takes the same parameters as func, except the last one (the
callback). When the output function is called with arguments, it will
return an Observable where the results will be delivered to.
A function which takes the arguments from the callback and maps those a value to emit on the output Observable.
A function which returns the Observable that delivers the same values the Node.js callback would deliver.
Converts a Node.js-style callback API to a function that returns an Observable.
It's just like bindCallback, but the
callback is expected to be of type callback(error, result).
bindNodeCallback is not an operator because its input and output are not
Observables. The input is a function func with some parameters, but the
last parameter must be a callback function that func calls when it is
done. The callback function is expected to follow Node.js conventions,
where the first argument to the callback is an error, while remaining
arguments are the callback result. The output of bindNodeCallback is a
function that takes the same parameters as func, except the last one (the
callback). When the output function is called with arguments, it will
return an Observable where the results will be delivered to.
A function which takes the arguments from the callback and maps those a value to emit on the output Observable.
A function which returns the Observable that delivers the same values the Node.js callback would deliver.
Converts a Node.js-style callback API to a function that returns an Observable.
It's just like bindCallback, but the
callback is expected to be of type callback(error, result).
bindNodeCallback is not an operator because its input and output are not
Observables. The input is a function func with some parameters, but the
last parameter must be a callback function that func calls when it is
done. The callback function is expected to follow Node.js conventions,
where the first argument to the callback is an error, while remaining
arguments are the callback result. The output of bindNodeCallback is a
function that takes the same parameters as func, except the last one (the
callback). When the output function is called with arguments, it will
return an Observable where the results will be delivered to.
A function which takes the arguments from the callback and maps those a value to emit on the output Observable.
A function which returns the Observable that delivers the same values the Node.js callback would deliver.
Converts a Node.js-style callback API to a function that returns an Observable.
It's just like bindCallback, but the
callback is expected to be of type callback(error, result).
bindNodeCallback is not an operator because its input and output are not
Observables. The input is a function func with some parameters, but the
last parameter must be a callback function that func calls when it is
done. The callback function is expected to follow Node.js conventions,
where the first argument to the callback is an error, while remaining
arguments are the callback result. The output of bindNodeCallback is a
function that takes the same parameters as func, except the last one (the
callback). When the output function is called with arguments, it will
return an Observable where the results will be delivered to.
A function which takes the arguments from the callback and maps those a value to emit on the output Observable.
A function which returns the Observable that delivers the same values the Node.js callback would deliver.
Converts a Node.js-style callback API to a function that returns an Observable.
It's just like bindCallback, but the
callback is expected to be of type callback(error, result).
bindNodeCallback is not an operator because its input and output are not
Observables. The input is a function func with some parameters, but the
last parameter must be a callback function that func calls when it is
done. The callback function is expected to follow Node.js conventions,
where the first argument to the callback is an error, while remaining
arguments are the callback result. The output of bindNodeCallback is a
function that takes the same parameters as func, except the last one (the
callback). When the output function is called with arguments, it will
return an Observable where the results will be delivered to.
A function which takes the arguments from the callback and maps those a value to emit on the output Observable.
A function which returns the Observable that delivers the same values the Node.js callback would deliver.
Converts a Node.js-style callback API to a function that returns an Observable.
It's just like bindCallback, but the
callback is expected to be of type callback(error, result).
bindNodeCallback is not an operator because its input and output are not
Observables. The input is a function func with some parameters, but the
last parameter must be a callback function that func calls when it is
done. The callback function is expected to follow Node.js conventions,
where the first argument to the callback is an error, while remaining
arguments are the callback result. The output of bindNodeCallback is a
function that takes the same parameters as func, except the last one (the
callback). When the output function is called with arguments, it will
return an Observable where the results will be delivered to.
A function which takes the arguments from the callback and maps those a value to emit on the output Observable.
A function which returns the Observable that delivers the same values the Node.js callback would deliver.
Converts a Node.js-style callback API to a function that returns an Observable.
It's just like bindCallback, but the
callback is expected to be of type callback(error, result).
bindNodeCallback is not an operator because its input and output are not
Observables. The input is a function func with some parameters, but the
last parameter must be a callback function that func calls when it is
done. The callback function is expected to follow Node.js conventions,
where the first argument to the callback is an error, while remaining
arguments are the callback result. The output of bindNodeCallback is a
function that takes the same parameters as func, except the last one (the
callback). When the output function is called with arguments, it will
return an Observable where the results will be delivered to.
A function which takes the arguments from the callback and maps those a value to emit on the output Observable.
A function which returns the Observable that delivers the same values the Node.js callback would deliver.
Converts a Node.js-style callback API to a function that returns an Observable.
It's just like bindCallback, but the
callback is expected to be of type callback(error, result).
bindNodeCallback is not an operator because its input and output are not
Observables. The input is a function func with some parameters, but the
last parameter must be a callback function that func calls when it is
done. The callback function is expected to follow Node.js conventions,
where the first argument to the callback is an error, while remaining
arguments are the callback result. The output of bindNodeCallback is a
function that takes the same parameters as func, except the last one (the
callback). When the output function is called with arguments, it will
return an Observable where the results will be delivered to.
A function which takes the arguments from the callback and maps those a value to emit on the output Observable.
A function which returns the Observable that delivers the same values the Node.js callback would deliver.
Converts a Node.js-style callback API to a function that returns an Observable.
It's just like bindCallback, but the
callback is expected to be of type callback(error, result).
bindNodeCallback is not an operator because its input and output are not
Observables. The input is a function func with some parameters, but the
last parameter must be a callback function that func calls when it is
done. The callback function is expected to follow Node.js conventions,
where the first argument to the callback is an error, while remaining
arguments are the callback result. The output of bindNodeCallback is a
function that takes the same parameters as func, except the last one (the
callback). When the output function is called with arguments, it will
return an Observable where the results will be delivered to.
A function which takes the arguments from the callback and maps those a value to emit on the output Observable.
A function which returns the Observable that delivers the same values the Node.js callback would deliver.
An interop point defined by the es7-observable spec https://github.com/zenparsing/es-observable
this instance of the observable
a handler for each value emitted by the observable
a promise that either resolves on observable completion or rejects with the handled error
Creates a new Observable, with this Observable as the source, and the passed operator defined as the new observable's operator.
the operator defining the operation to take on the observable
a new observable with the Operator applied
Registers handlers for handling emitted values, error and completions from the observable, and executes the observable's subscriber function, which will take action to set up the underlying data stream
(optional) either an observer defining all functions to be called, or the first of three possible handlers, which is the handler for each value emitted from the observable.
(optional) a handler for a terminal event resulting from an error. If no error handler is provided, the error will be thrown as unhandled
(optional) a handler for a terminal event resulting from successful completion.
a subscription reference to the registered handlers
Creates a new cold Observable by calling the Observable constructor
a new cold observable
A flag to indicate whether this Subscription has already been unsubscribed.
Adds a tear down to be called during the unsubscribe() of this Subscription.
If the tear down being added is a subscription that is already
unsubscribed, is the same reference add is being called on, or is
Subscription.EMPTY, it will not be added.
If this subscription is already in an isUnsubscribed state, the passed
tear down logic will be executed immediately.
The additional logic to execute on teardown.
Returns the Subscription used or created to be
added to the inner subscriptions list. This Subscription can be used with
remove() to remove the passed teardown logic from the inner subscriptions
list.
The Observer callback to receive a valueless notification of type
complete from the Observable. Notifies the Observer that the Observable
has finished sending push-based notifications.
The Observer callback to receive notifications of type next from
the Observable, with a value. The Observable may call this method 0 or more
times.
Removes a Subscription from the internal list of subscriptions that will unsubscribe during the unsubscribe process of this Subscription.
The subscription to remove.
A static factory for a Subscriber, given a (potentially partial) definition of an Observer.
A Subscriber wrapping the (partially defined) Observer represented by the given arguments.
A flag to indicate whether this Subscription has already been unsubscribed.
Adds a tear down to be called during the unsubscribe() of this Subscription.
If the tear down being added is a subscription that is already
unsubscribed, is the same reference add is being called on, or is
Subscription.EMPTY, it will not be added.
If this subscription is already in an isUnsubscribed state, the passed
tear down logic will be executed immediately.
The additional logic to execute on teardown.
Returns the Subscription used or created to be
added to the inner subscriptions list. This Subscription can be used with
remove() to remove the passed teardown logic from the inner subscriptions
list.
The Observer callback to receive a valueless notification of type
complete from the Observable. Notifies the Observer that the Observable
has finished sending push-based notifications.
The Observer callback to receive notifications of type next from
the Observable, with a value. The Observable may call this method 0 or more
times.
Removes a Subscription from the internal list of subscriptions that will unsubscribe during the unsubscribe process of this Subscription.
The subscription to remove.
A static factory for a Subscriber, given a (potentially partial) definition of an Observer.
A Subscriber wrapping the (partially defined) Observer represented by the given arguments.
We need this JSDoc comment for affecting ESDoc.
An interop point defined by the es7-observable spec https://github.com/zenparsing/es-observable
this instance of the observable
a handler for each value emitted by the observable
a promise that either resolves on observable completion or rejects with the handled error
Creates a new Observable, with this Observable as the source, and the passed operator defined as the new observable's operator.
the operator defining the operation to take on the observable
a new observable with the Operator applied
Registers handlers for handling emitted values, error and completions from the observable, and executes the observable's subscriber function, which will take action to set up the underlying data stream
(optional) either an observer defining all functions to be called, or the first of three possible handlers, which is the handler for each value emitted from the observable.
(optional) a handler for a terminal event resulting from an error. If no error handler is provided, the error will be thrown as unhandled
(optional) a handler for a terminal event resulting from successful completion.
a subscription reference to the registered handlers
Creates an Observable that, on subscribe, calls an Observable factory to make an Observable for each new Observer.
Creates the Observable lazily, that is, only when it is subscribed.

defer allows you to create the Observable only when the Observer
subscribes, and create a fresh Observable for each Observer. It waits until
an Observer subscribes to it, and then it generates an Observable,
typically with an Observable factory function. It does this afresh for each
subscriber, so although each subscriber may think it is subscribing to the
same Observable, in fact each subscriber gets its own individual
Observable.
The Observable factory function to invoke for each Observer that subscribes to the output Observable. May also return a Promise, which will be converted on the fly to an Observable.
An Observable whose Observers' subscriptions trigger an invocation of the given Observable factory function.
A flag to indicate whether this Subscription has already been unsubscribed.
Adds a tear down to be called during the unsubscribe() of this Subscription.
If the tear down being added is a subscription that is already
unsubscribed, is the same reference add is being called on, or is
Subscription.EMPTY, it will not be added.
If this subscription is already in an isUnsubscribed state, the passed
tear down logic will be executed immediately.
The additional logic to execute on teardown.
Returns the Subscription used or created to be
added to the inner subscriptions list. This Subscription can be used with
remove() to remove the passed teardown logic from the inner subscriptions
list.
The Observer callback to receive a valueless notification of type
complete from the Observable. Notifies the Observer that the Observable
has finished sending push-based notifications.
The Observer callback to receive notifications of type next from
the Observable, with a value. The Observable may call this method 0 or more
times.
Removes a Subscription from the internal list of subscriptions that will unsubscribe during the unsubscribe process of this Subscription.
The subscription to remove.
A static factory for a Subscriber, given a (potentially partial) definition of an Observer.
A Subscriber wrapping the (partially defined) Observer represented by the given arguments.
We need this JSDoc comment for affecting ESDoc.
An interop point defined by the es7-observable spec https://github.com/zenparsing/es-observable
this instance of the observable
a handler for each value emitted by the observable
a promise that either resolves on observable completion or rejects with the handled error
Creates a new Observable, with this Observable as the source, and the passed operator defined as the new observable's operator.
the operator defining the operation to take on the observable
a new observable with the Operator applied
Registers handlers for handling emitted values, error and completions from the observable, and executes the observable's subscriber function, which will take action to set up the underlying data stream
(optional) either an observer defining all functions to be called, or the first of three possible handlers, which is the handler for each value emitted from the observable.
(optional) a handler for a terminal event resulting from an error. If no error handler is provided, the error will be thrown as unhandled
(optional) a handler for a terminal event resulting from successful completion.
a subscription reference to the registered handlers
Creates an Observable that emits no items to the Observer and immediately emits a complete notification.
Just emits 'complete', and nothing else.

This static operator is useful for creating a simple Observable that only emits the complete notification. It can be used for composing with other Observables, such as in a mergeMap.
An "empty" Observable: emits only the complete notification.
We need this JSDoc comment for affecting ESDoc.
An interop point defined by the es7-observable spec https://github.com/zenparsing/es-observable
this instance of the observable
a handler for each value emitted by the observable
a promise that either resolves on observable completion or rejects with the handled error
Creates a new Observable, with this Observable as the source, and the passed operator defined as the new observable's operator.
the operator defining the operation to take on the observable
a new observable with the Operator applied
Registers handlers for handling emitted values, error and completions from the observable, and executes the observable's subscriber function, which will take action to set up the underlying data stream
(optional) either an observer defining all functions to be called, or the first of three possible handlers, which is the handler for each value emitted from the observable.
(optional) a handler for a terminal event resulting from an error. If no error handler is provided, the error will be thrown as unhandled
(optional) a handler for a terminal event resulting from successful completion.
a subscription reference to the registered handlers
Creates an Observable that emits no items to the Observer and immediately emits an error notification.
Just emits 'error', and nothing else.

This static operator is useful for creating a simple Observable that only emits the error notification. It can be used for composing with other Observables, such as in a mergeMap.
The particular Error to pass to the error notification.
An error Observable: emits only the error notification using the given error argument.
We need this JSDoc comment for affecting ESDoc.
An interop point defined by the es7-observable spec https://github.com/zenparsing/es-observable
this instance of the observable
a handler for each value emitted by the observable
a promise that either resolves on observable completion or rejects with the handled error
Creates a new Observable, with this Observable as the source, and the passed operator defined as the new observable's operator.
the operator defining the operation to take on the observable
a new observable with the Operator applied
Registers handlers for handling emitted values, error and completions from the observable, and executes the observable's subscriber function, which will take action to set up the underlying data stream
(optional) either an observer defining all functions to be called, or the first of three possible handlers, which is the handler for each value emitted from the observable.
(optional) a handler for a terminal event resulting from an error. If no error handler is provided, the error will be thrown as unhandled
(optional) a handler for a terminal event resulting from successful completion.
a subscription reference to the registered handlers
We need this JSDoc comment for affecting ESDoc.
A flag to indicate whether this Subscription has already been unsubscribed.
Adds a tear down to be called during the unsubscribe() of this Subscription.
If the tear down being added is a subscription that is already
unsubscribed, is the same reference add is being called on, or is
Subscription.EMPTY, it will not be added.
If this subscription is already in an isUnsubscribed state, the passed
tear down logic will be executed immediately.
The additional logic to execute on teardown.
Returns the Subscription used or created to be
added to the inner subscriptions list. This Subscription can be used with
remove() to remove the passed teardown logic from the inner subscriptions
list.
The Observer callback to receive a valueless notification of type
complete from the Observable. Notifies the Observer that the Observable
has finished sending push-based notifications.
The Observer callback to receive notifications of type next from
the Observable, with a value. The Observable may call this method 0 or more
times.
Removes a Subscription from the internal list of subscriptions that will unsubscribe during the unsubscribe process of this Subscription.
The subscription to remove.
A static factory for a Subscriber, given a (potentially partial) definition of an Observer.
A Subscriber wrapping the (partially defined) Observer represented by the given arguments.
We need this JSDoc comment for affecting ESDoc.
An interop point defined by the es7-observable spec https://github.com/zenparsing/es-observable
this instance of the observable
a handler for each value emitted by the observable
a promise that either resolves on observable completion or rejects with the handled error
Creates a new Observable, with this Observable as the source, and the passed operator defined as the new observable's operator.
the operator defining the operation to take on the observable
a new observable with the Operator applied
Registers handlers for handling emitted values, error and completions from the observable, and executes the observable's subscriber function, which will take action to set up the underlying data stream
(optional) either an observer defining all functions to be called, or the first of three possible handlers, which is the handler for each value emitted from the observable.
(optional) a handler for a terminal event resulting from an error. If no error handler is provided, the error will be thrown as unhandled
(optional) a handler for a terminal event resulting from successful completion.
a subscription reference to the registered handlers
Creates an Observable that emits events of a specific type coming from the given event target.
Creates an Observable from DOM events, or Node EventEmitter events or others.

Creates an Observable by attaching an event listener to an "event target",
which may be an object with addEventListener and removeEventListener,
a Node.js EventEmitter, a jQuery style EventEmitter, a NodeList from the
DOM, or an HTMLCollection from the DOM. The event handler is attached when
the output Observable is subscribed, and removed when the Subscription is
unsubscribed.
The DOMElement, event target, Node.js EventEmitter, NodeList or HTMLCollection to attach the event handler to.
The event name of interest, being emitted by the
target.
We need this JSDoc comment for affecting ESDoc.
An interop point defined by the es7-observable spec https://github.com/zenparsing/es-observable
this instance of the observable
a handler for each value emitted by the observable
a promise that either resolves on observable completion or rejects with the handled error
Creates a new Observable, with this Observable as the source, and the passed operator defined as the new observable's operator.
the operator defining the operation to take on the observable
a new observable with the Operator applied
Registers handlers for handling emitted values, error and completions from the observable, and executes the observable's subscriber function, which will take action to set up the underlying data stream
(optional) either an observer defining all functions to be called, or the first of three possible handlers, which is the handler for each value emitted from the observable.
(optional) a handler for a terminal event resulting from an error. If no error handler is provided, the error will be thrown as unhandled
(optional) a handler for a terminal event resulting from successful completion.
a subscription reference to the registered handlers
Creates an Observable from an API based on addHandler/removeHandler functions.
Converts any addHandler/removeHandler API to an Observable.

Creates an Observable by using the addHandler and removeHandler
functions to add and remove the handlers, with an optional selector
function to project the event arguments to a result. The addHandler is
called when the output Observable is subscribed, and removeHandler is
called when the Subscription is unsubscribed.
A function that takes
a handler function as argument and attaches it somehow to the actual
source of events.
A function that
takes a handler function as argument and removes it in case it was
previously attached using addHandler.
We need this JSDoc comment for affecting ESDoc.
An interop point defined by the es7-observable spec https://github.com/zenparsing/es-observable
this instance of the observable
a handler for each value emitted by the observable
a promise that either resolves on observable completion or rejects with the handled error
Creates a new Observable, with this Observable as the source, and the passed operator defined as the new observable's operator.
the operator defining the operation to take on the observable
a new observable with the Operator applied
Registers handlers for handling emitted values, error and completions from the observable, and executes the observable's subscriber function, which will take action to set up the underlying data stream
(optional) either an observer defining all functions to be called, or the first of three possible handlers, which is the handler for each value emitted from the observable.
(optional) a handler for a terminal event resulting from an error. If no error handler is provided, the error will be thrown as unhandled
(optional) a handler for a terminal event resulting from successful completion.
a subscription reference to the registered handlers
Creates an Observable from an Array, an array-like object, a Promise, an iterable object, or an Observable-like object.
Converts almost anything to an Observable.

Convert various other objects and data types into Observables. from
converts a Promise or an array-like or an
iterable
object into an Observable that emits the items in that promise or array or
iterable. A String, in this context, is treated as an array of characters.
Observable-like objects (contains a function named with the ES2015 Symbol
for Observable) can also be converted through this operator.
A subscribable object, a Promise, an Observable-like, an Array, an iterable or an array-like object to be converted.
The Observable whose values are originally from the input object that was converted.
Creates an Observable from an Array, an array-like object, a Promise, an iterable object, or an Observable-like object.
Converts almost anything to an Observable.

Convert various other objects and data types into Observables. from
converts a Promise or an array-like or an
iterable
object into an Observable that emits the items in that promise or array or
iterable. A String, in this context, is treated as an array of characters.
Observable-like objects (contains a function named with the ES2015 Symbol
for Observable) can also be converted through this operator.
A subscribable object, a Promise, an Observable-like, an Array, an iterable or an array-like object to be converted.
The Observable whose values are originally from the input object that was converted.
We need this JSDoc comment for affecting ESDoc.
An interop point defined by the es7-observable spec https://github.com/zenparsing/es-observable
this instance of the observable
a handler for each value emitted by the observable
a promise that either resolves on observable completion or rejects with the handled error
Creates a new Observable, with this Observable as the source, and the passed operator defined as the new observable's operator.
the operator defining the operation to take on the observable
a new observable with the Operator applied
Registers handlers for handling emitted values, error and completions from the observable, and executes the observable's subscriber function, which will take action to set up the underlying data stream
(optional) either an observer defining all functions to be called, or the first of three possible handlers, which is the handler for each value emitted from the observable.
(optional) a handler for a terminal event resulting from an error. If no error handler is provided, the error will be thrown as unhandled
(optional) a handler for a terminal event resulting from successful completion.
a subscription reference to the registered handlers
Generates an observable sequence by running a state-driven loop producing the sequence's elements, using the specified scheduler to send out observer messages.

Initial state.
Condition to terminate generation (upon returning false).
Iteration step function.
Selector function for results produced in the sequence.
The generated sequence.
Generates an observable sequence by running a state-driven loop producing the sequence's elements, using the specified scheduler to send out observer messages. The overload uses state as an emitted value.

Initial state.
Condition to terminate generation (upon returning false).
Iteration step function.
The generated sequence.
Generates an observable sequence by running a state-driven loop producing the sequence's elements, using the specified scheduler to send out observer messages. The overload accepts options object that might contain inital state, iterate, condition and scheduler.

Object that must contain initialState, iterate and might contain condition and scheduler.
The generated sequence.
Generates an observable sequence by running a state-driven loop producing the sequence's elements, using the specified scheduler to send out observer messages. The overload accepts options object that might contain inital state, iterate, condition, result selector and scheduler.

Object that must contain initialState, iterate, resultSelector and might contain condition and scheduler.
The generated sequence.
Condition function that accepts state and returns boolean. When it returns false, the generator stops. If not specified, a generator never stops.
Inital state.
Iterate function that accepts state and returns new state.
Scheduler to use for generation process. By default, a generator starts immediately.
Condition function that accepts state and returns boolean. When it returns false, the generator stops. If not specified, a generator never stops.
Inital state.
Iterate function that accepts state and returns new state.
Result selection function that accepts state and returns a value to emit.
Scheduler to use for generation process. By default, a generator starts immediately.
We need this JSDoc comment for affecting ESDoc.
An interop point defined by the es7-observable spec https://github.com/zenparsing/es-observable
this instance of the observable
a handler for each value emitted by the observable
a promise that either resolves on observable completion or rejects with the handled error
Creates a new Observable, with this Observable as the source, and the passed operator defined as the new observable's operator.
the operator defining the operation to take on the observable
a new observable with the Operator applied
Registers handlers for handling emitted values, error and completions from the observable, and executes the observable's subscriber function, which will take action to set up the underlying data stream
(optional) either an observer defining all functions to be called, or the first of three possible handlers, which is the handler for each value emitted from the observable.
(optional) a handler for a terminal event resulting from an error. If no error handler is provided, the error will be thrown as unhandled
(optional) a handler for a terminal event resulting from successful completion.
a subscription reference to the registered handlers
A flag to indicate whether this Subscription has already been unsubscribed.
Adds a tear down to be called during the unsubscribe() of this Subscription.
If the tear down being added is a subscription that is already
unsubscribed, is the same reference add is being called on, or is
Subscription.EMPTY, it will not be added.
If this subscription is already in an isUnsubscribed state, the passed
tear down logic will be executed immediately.
The additional logic to execute on teardown.
Returns the Subscription used or created to be
added to the inner subscriptions list. This Subscription can be used with
remove() to remove the passed teardown logic from the inner subscriptions
list.
The Observer callback to receive a valueless notification of type
complete from the Observable. Notifies the Observer that the Observable
has finished sending push-based notifications.
The Observer callback to receive notifications of type next from
the Observable, with a value. The Observable may call this method 0 or more
times.
Removes a Subscription from the internal list of subscriptions that will unsubscribe during the unsubscribe process of this Subscription.
The subscription to remove.
A static factory for a Subscriber, given a (potentially partial) definition of an Observer.
A Subscriber wrapping the (partially defined) Observer represented by the given arguments.
We need this JSDoc comment for affecting ESDoc.
An interop point defined by the es7-observable spec https://github.com/zenparsing/es-observable
this instance of the observable
a handler for each value emitted by the observable
a promise that either resolves on observable completion or rejects with the handled error
Creates a new Observable, with this Observable as the source, and the passed operator defined as the new observable's operator.
the operator defining the operation to take on the observable
a new observable with the Operator applied
Registers handlers for handling emitted values, error and completions from the observable, and executes the observable's subscriber function, which will take action to set up the underlying data stream
(optional) either an observer defining all functions to be called, or the first of three possible handlers, which is the handler for each value emitted from the observable.
(optional) a handler for a terminal event resulting from an error. If no error handler is provided, the error will be thrown as unhandled
(optional) a handler for a terminal event resulting from successful completion.
a subscription reference to the registered handlers
Creates an Observable that emits sequential numbers every specified interval of time, on a specified Scheduler.
Emits incremental numbers periodically in time.

interval returns an Observable that emits an infinite sequence of
ascending integers, with a constant interval of time of your choosing
between those emissions. The first emission is not sent immediately, but
only after the first period has passed. By default, this operator uses the
async Scheduler to provide a notion of time, but you may pass any
Scheduler to it.
An Observable that emits a sequential number each time interval.
We need this JSDoc comment for affecting ESDoc.
An interop point defined by the es7-observable spec https://github.com/zenparsing/es-observable
this instance of the observable
a handler for each value emitted by the observable
a promise that either resolves on observable completion or rejects with the handled error
Creates a new Observable, with this Observable as the source, and the passed operator defined as the new observable's operator.
the operator defining the operation to take on the observable
a new observable with the Operator applied
Registers handlers for handling emitted values, error and completions from the observable, and executes the observable's subscriber function, which will take action to set up the underlying data stream
(optional) either an observer defining all functions to be called, or the first of three possible handlers, which is the handler for each value emitted from the observable.
(optional) a handler for a terminal event resulting from an error. If no error handler is provided, the error will be thrown as unhandled
(optional) a handler for a terminal event resulting from successful completion.
a subscription reference to the registered handlers
An interop point defined by the es7-observable spec https://github.com/zenparsing/es-observable
this instance of the observable
a handler for each value emitted by the observable
a promise that either resolves on observable completion or rejects with the handled error
Creates a new Observable, with this Observable as the source, and the passed operator defined as the new observable's operator.
the operator defining the operation to take on the observable
a new observable with the Operator applied
Registers handlers for handling emitted values, error and completions from the observable, and executes the observable's subscriber function, which will take action to set up the underlying data stream
(optional) either an observer defining all functions to be called, or the first of three possible handlers, which is the handler for each value emitted from the observable.
(optional) a handler for a terminal event resulting from an error. If no error handler is provided, the error will be thrown as unhandled
(optional) a handler for a terminal event resulting from successful completion.
a subscription reference to the registered handlers
Creates a new cold Observable by calling the Observable constructor
a new cold observable
We need this JSDoc comment for affecting ESDoc.
An interop point defined by the es7-observable spec https://github.com/zenparsing/es-observable
this instance of the observable
a handler for each value emitted by the observable
a promise that either resolves on observable completion or rejects with the handled error
Creates a new Observable, with this Observable as the source, and the passed operator defined as the new observable's operator.
the operator defining the operation to take on the observable
a new observable with the Operator applied
Registers handlers for handling emitted values, error and completions from the observable, and executes the observable's subscriber function, which will take action to set up the underlying data stream
(optional) either an observer defining all functions to be called, or the first of three possible handlers, which is the handler for each value emitted from the observable.
(optional) a handler for a terminal event resulting from an error. If no error handler is provided, the error will be thrown as unhandled
(optional) a handler for a terminal event resulting from successful completion.
a subscription reference to the registered handlers
Creates an Observable that emits no items to the Observer.
An Observable that never emits anything.

This static operator is useful for creating a simple Observable that emits neither values nor errors nor the completion notification. It can be used for testing purposes or for composing with other Observables. Please not that by never emitting a complete notification, this Observable keeps the subscription from being disposed automatically. Subscriptions need to be manually disposed.
A "never" Observable: never emits anything.
We need this JSDoc comment for affecting ESDoc.
An interop point defined by the es7-observable spec https://github.com/zenparsing/es-observable
this instance of the observable
a handler for each value emitted by the observable
a promise that either resolves on observable completion or rejects with the handled error
Creates a new Observable, with this Observable as the source, and the passed operator defined as the new observable's operator.
the operator defining the operation to take on the observable
a new observable with the Operator applied
Registers handlers for handling emitted values, error and completions from the observable, and executes the observable's subscriber function, which will take action to set up the underlying data stream
(optional) either an observer defining all functions to be called, or the first of three possible handlers, which is the handler for each value emitted from the observable.
(optional) a handler for a terminal event resulting from an error. If no error handler is provided, the error will be thrown as unhandled
(optional) a handler for a terminal event resulting from successful completion.
a subscription reference to the registered handlers
Converts a Promise to an Observable.
Returns an Observable that just emits the Promise's resolved value, then completes.
Converts an ES2015 Promise or a Promises/A+ spec compliant Promise to an
Observable. If the Promise resolves with a value, the output Observable
emits that resolved value as a next, and then completes. If the Promise
is rejected, then the output Observable emits the corresponding Error.
The promise to be converted.
An Observable which wraps the Promise.
We need this JSDoc comment for affecting ESDoc.
An interop point defined by the es7-observable spec https://github.com/zenparsing/es-observable
this instance of the observable
a handler for each value emitted by the observable
a promise that either resolves on observable completion or rejects with the handled error
Creates a new Observable, with this Observable as the source, and the passed operator defined as the new observable's operator.
the operator defining the operation to take on the observable
a new observable with the Operator applied
Registers handlers for handling emitted values, error and completions from the observable, and executes the observable's subscriber function, which will take action to set up the underlying data stream
(optional) either an observer defining all functions to be called, or the first of three possible handlers, which is the handler for each value emitted from the observable.
(optional) a handler for a terminal event resulting from an error. If no error handler is provided, the error will be thrown as unhandled
(optional) a handler for a terminal event resulting from successful completion.
a subscription reference to the registered handlers
Creates an Observable that emits a sequence of numbers within a specified range.
Emits a sequence of numbers in a range.

range operator emits a range of sequential integers, in order, where you
select the start of the range and its length. By default, uses no
Scheduler and just delivers the notifications synchronously, but may use
an optional Scheduler to regulate those deliveries.
An Observable of numbers that emits a finite range of sequential integers.
We need this JSDoc comment for affecting ESDoc.
An interop point defined by the es7-observable spec https://github.com/zenparsing/es-observable
this instance of the observable
a handler for each value emitted by the observable
a promise that either resolves on observable completion or rejects with the handled error
Creates a new Observable, with this Observable as the source, and the passed operator defined as the new observable's operator.
the operator defining the operation to take on the observable
a new observable with the Operator applied
Registers handlers for handling emitted values, error and completions from the observable, and executes the observable's subscriber function, which will take action to set up the underlying data stream
(optional) either an observer defining all functions to be called, or the first of three possible handlers, which is the handler for each value emitted from the observable.
(optional) a handler for a terminal event resulting from an error. If no error handler is provided, the error will be thrown as unhandled
(optional) a handler for a terminal event resulting from successful completion.
a subscription reference to the registered handlers
We need this JSDoc comment for affecting ESDoc.
An interop point defined by the es7-observable spec https://github.com/zenparsing/es-observable
this instance of the observable
a handler for each value emitted by the observable
a promise that either resolves on observable completion or rejects with the handled error
Creates a new Observable, with this Observable as the source, and the passed operator defined as the new observable's operator.
the operator defining the operation to take on the observable
a new observable with the Operator applied
Registers handlers for handling emitted values, error and completions from the observable, and executes the observable's subscriber function, which will take action to set up the underlying data stream
(optional) either an observer defining all functions to be called, or the first of three possible handlers, which is the handler for each value emitted from the observable.
(optional) a handler for a terminal event resulting from an error. If no error handler is provided, the error will be thrown as unhandled
(optional) a handler for a terminal event resulting from successful completion.
a subscription reference to the registered handlers
We need this JSDoc comment for affecting ESDoc.
An interop point defined by the es7-observable spec https://github.com/zenparsing/es-observable
this instance of the observable
a handler for each value emitted by the observable
a promise that either resolves on observable completion or rejects with the handled error
Creates a new Observable, with this Observable as the source, and the passed operator defined as the new observable's operator.
the operator defining the operation to take on the observable
a new observable with the Operator applied
Registers handlers for handling emitted values, error and completions from the observable, and executes the observable's subscriber function, which will take action to set up the underlying data stream
(optional) either an observer defining all functions to be called, or the first of three possible handlers, which is the handler for each value emitted from the observable.
(optional) a handler for a terminal event resulting from an error. If no error handler is provided, the error will be thrown as unhandled
(optional) a handler for a terminal event resulting from successful completion.
a subscription reference to the registered handlers
Creates an Observable that starts emitting after an initialDelay and
emits ever increasing numbers after each period of time thereafter.
Its like {@link interval}, but you can specify when should the emissions start.

timer returns an Observable that emits an infinite sequence of ascending
integers, with a constant interval of time, period of your choosing
between those emissions. The first emission happens after the specified
initialDelay. The initial delay may be a Date. By default, this
operator uses the async Scheduler to provide a notion of time, but you
may pass any Scheduler to it. If period is not specified, the output
Observable emits only one value, 0. Otherwise, it emits an infinite
sequence.
The initial delay time to wait before
emitting the first value of 0.
An Observable that emits a 0 after the
initialDelay and ever increasing numbers after each period of time
thereafter.
We need this JSDoc comment for affecting ESDoc.
An interop point defined by the es7-observable spec https://github.com/zenparsing/es-observable
this instance of the observable
a handler for each value emitted by the observable
a promise that either resolves on observable completion or rejects with the handled error
Creates a new Observable, with this Observable as the source, and the passed operator defined as the new observable's operator.
the operator defining the operation to take on the observable
a new observable with the Operator applied
Registers handlers for handling emitted values, error and completions from the observable, and executes the observable's subscriber function, which will take action to set up the underlying data stream
(optional) either an observer defining all functions to be called, or the first of three possible handlers, which is the handler for each value emitted from the observable.
(optional) a handler for a terminal event resulting from an error. If no error handler is provided, the error will be thrown as unhandled
(optional) a handler for a terminal event resulting from successful completion.
a subscription reference to the registered handlers
A flag to indicate whether this Subscription has already been unsubscribed.
Adds a tear down to be called during the unsubscribe() of this Subscription.
If the tear down being added is a subscription that is already
unsubscribed, is the same reference add is being called on, or is
Subscription.EMPTY, it will not be added.
If this subscription is already in an isUnsubscribed state, the passed
tear down logic will be executed immediately.
The additional logic to execute on teardown.
Returns the Subscription used or created to be
added to the inner subscriptions list. This Subscription can be used with
remove() to remove the passed teardown logic from the inner subscriptions
list.
The Observer callback to receive a valueless notification of type
complete from the Observable. Notifies the Observer that the Observable
has finished sending push-based notifications.
The Observer callback to receive notifications of type next from
the Observable, with a value. The Observable may call this method 0 or more
times.
Removes a Subscription from the internal list of subscriptions that will unsubscribe during the unsubscribe process of this Subscription.
The subscription to remove.
A static factory for a Subscriber, given a (potentially partial) definition of an Observer.
A Subscriber wrapping the (partially defined) Observer represented by the given arguments.
Combines multiple Observables to create an Observable whose values are calculated from the latest values of each of its input Observables.
Whenever any input Observable emits a value, it computes a formula using the latest values from all the inputs, then emits the output of that formula.

combineLatest combines the values from all the Observables passed as
arguments. This is done by subscribing to each Observable, in order, and
collecting an array of each of the most recent values any time any of the
input Observables emits, then either taking that array and passing it as
arguments to an optional project function and emitting the return value of
that, or just emitting the array of recent values directly if there is no
project function.
An Observable of projected values from the most recent values from each input Observable, or an array of the most recent values from each input Observable.
Combines multiple Observables to create an Observable whose values are calculated from the latest values of each of its input Observables.
Whenever any input Observable emits a value, it computes a formula using the latest values from all the inputs, then emits the output of that formula.

combineLatest combines the values from all the Observables passed as
arguments. This is done by subscribing to each Observable, in order, and
collecting an array of each of the most recent values any time any of the
input Observables emits, then either taking that array and passing it as
arguments to an optional project function and emitting the return value of
that, or just emitting the array of recent values directly if there is no
project function.
An Observable of projected values from the most recent values from each input Observable, or an array of the most recent values from each input Observable.
Combines multiple Observables to create an Observable whose values are calculated from the latest values of each of its input Observables.
Whenever any input Observable emits a value, it computes a formula using the latest values from all the inputs, then emits the output of that formula.

combineLatest combines the values from all the Observables passed as
arguments. This is done by subscribing to each Observable, in order, and
collecting an array of each of the most recent values any time any of the
input Observables emits, then either taking that array and passing it as
arguments to an optional project function and emitting the return value of
that, or just emitting the array of recent values directly if there is no
project function.
An Observable of projected values from the most recent values from each input Observable, or an array of the most recent values from each input Observable.
Combines multiple Observables to create an Observable whose values are calculated from the latest values of each of its input Observables.
Whenever any input Observable emits a value, it computes a formula using the latest values from all the inputs, then emits the output of that formula.

combineLatest combines the values from all the Observables passed as
arguments. This is done by subscribing to each Observable, in order, and
collecting an array of each of the most recent values any time any of the
input Observables emits, then either taking that array and passing it as
arguments to an optional project function and emitting the return value of
that, or just emitting the array of recent values directly if there is no
project function.
An Observable of projected values from the most recent values from each input Observable, or an array of the most recent values from each input Observable.
Combines multiple Observables to create an Observable whose values are calculated from the latest values of each of its input Observables.
Whenever any input Observable emits a value, it computes a formula using the latest values from all the inputs, then emits the output of that formula.

combineLatest combines the values from all the Observables passed as
arguments. This is done by subscribing to each Observable, in order, and
collecting an array of each of the most recent values any time any of the
input Observables emits, then either taking that array and passing it as
arguments to an optional project function and emitting the return value of
that, or just emitting the array of recent values directly if there is no
project function.
An Observable of projected values from the most recent values from each input Observable, or an array of the most recent values from each input Observable.
Combines multiple Observables to create an Observable whose values are calculated from the latest values of each of its input Observables.
Whenever any input Observable emits a value, it computes a formula using the latest values from all the inputs, then emits the output of that formula.

combineLatest combines the values from all the Observables passed as
arguments. This is done by subscribing to each Observable, in order, and
collecting an array of each of the most recent values any time any of the
input Observables emits, then either taking that array and passing it as
arguments to an optional project function and emitting the return value of
that, or just emitting the array of recent values directly if there is no
project function.
An Observable of projected values from the most recent values from each input Observable, or an array of the most recent values from each input Observable.
Combines multiple Observables to create an Observable whose values are calculated from the latest values of each of its input Observables.
Whenever any input Observable emits a value, it computes a formula using the latest values from all the inputs, then emits the output of that formula.

combineLatest combines the values from all the Observables passed as
arguments. This is done by subscribing to each Observable, in order, and
collecting an array of each of the most recent values any time any of the
input Observables emits, then either taking that array and passing it as
arguments to an optional project function and emitting the return value of
that, or just emitting the array of recent values directly if there is no
project function.
An Observable of projected values from the most recent values from each input Observable, or an array of the most recent values from each input Observable.
Combines multiple Observables to create an Observable whose values are calculated from the latest values of each of its input Observables.
Whenever any input Observable emits a value, it computes a formula using the latest values from all the inputs, then emits the output of that formula.

combineLatest combines the values from all the Observables passed as
arguments. This is done by subscribing to each Observable, in order, and
collecting an array of each of the most recent values any time any of the
input Observables emits, then either taking that array and passing it as
arguments to an optional project function and emitting the return value of
that, or just emitting the array of recent values directly if there is no
project function.
An Observable of projected values from the most recent values from each input Observable, or an array of the most recent values from each input Observable.
Combines multiple Observables to create an Observable whose values are calculated from the latest values of each of its input Observables.
Whenever any input Observable emits a value, it computes a formula using the latest values from all the inputs, then emits the output of that formula.

combineLatest combines the values from all the Observables passed as
arguments. This is done by subscribing to each Observable, in order, and
collecting an array of each of the most recent values any time any of the
input Observables emits, then either taking that array and passing it as
arguments to an optional project function and emitting the return value of
that, or just emitting the array of recent values directly if there is no
project function.
An Observable of projected values from the most recent values from each input Observable, or an array of the most recent values from each input Observable.
Combines multiple Observables to create an Observable whose values are calculated from the latest values of each of its input Observables.
Whenever any input Observable emits a value, it computes a formula using the latest values from all the inputs, then emits the output of that formula.

combineLatest combines the values from all the Observables passed as
arguments. This is done by subscribing to each Observable, in order, and
collecting an array of each of the most recent values any time any of the
input Observables emits, then either taking that array and passing it as
arguments to an optional project function and emitting the return value of
that, or just emitting the array of recent values directly if there is no
project function.
An Observable of projected values from the most recent values from each input Observable, or an array of the most recent values from each input Observable.
Combines multiple Observables to create an Observable whose values are calculated from the latest values of each of its input Observables.
Whenever any input Observable emits a value, it computes a formula using the latest values from all the inputs, then emits the output of that formula.

combineLatest combines the values from all the Observables passed as
arguments. This is done by subscribing to each Observable, in order, and
collecting an array of each of the most recent values any time any of the
input Observables emits, then either taking that array and passing it as
arguments to an optional project function and emitting the return value of
that, or just emitting the array of recent values directly if there is no
project function.
An Observable of projected values from the most recent values from each input Observable, or an array of the most recent values from each input Observable.
Combines multiple Observables to create an Observable whose values are calculated from the latest values of each of its input Observables.
Whenever any input Observable emits a value, it computes a formula using the latest values from all the inputs, then emits the output of that formula.

combineLatest combines the values from all the Observables passed as
arguments. This is done by subscribing to each Observable, in order, and
collecting an array of each of the most recent values any time any of the
input Observables emits, then either taking that array and passing it as
arguments to an optional project function and emitting the return value of
that, or just emitting the array of recent values directly if there is no
project function.
An Observable of projected values from the most recent values from each input Observable, or an array of the most recent values from each input Observable.
Combines multiple Observables to create an Observable whose values are calculated from the latest values of each of its input Observables.
Whenever any input Observable emits a value, it computes a formula using the latest values from all the inputs, then emits the output of that formula.

combineLatest combines the values from all the Observables passed as
arguments. This is done by subscribing to each Observable, in order, and
collecting an array of each of the most recent values any time any of the
input Observables emits, then either taking that array and passing it as
arguments to an optional project function and emitting the return value of
that, or just emitting the array of recent values directly if there is no
project function.
An Observable of projected values from the most recent values from each input Observable, or an array of the most recent values from each input Observable.
Combines multiple Observables to create an Observable whose values are calculated from the latest values of each of its input Observables.
Whenever any input Observable emits a value, it computes a formula using the latest values from all the inputs, then emits the output of that formula.

combineLatest combines the values from all the Observables passed as
arguments. This is done by subscribing to each Observable, in order, and
collecting an array of each of the most recent values any time any of the
input Observables emits, then either taking that array and passing it as
arguments to an optional project function and emitting the return value of
that, or just emitting the array of recent values directly if there is no
project function.
An Observable of projected values from the most recent values from each input Observable, or an array of the most recent values from each input Observable.
Combines multiple Observables to create an Observable whose values are calculated from the latest values of each of its input Observables.
Whenever any input Observable emits a value, it computes a formula using the latest values from all the inputs, then emits the output of that formula.

combineLatest combines the values from all the Observables passed as
arguments. This is done by subscribing to each Observable, in order, and
collecting an array of each of the most recent values any time any of the
input Observables emits, then either taking that array and passing it as
arguments to an optional project function and emitting the return value of
that, or just emitting the array of recent values directly if there is no
project function.
An Observable of projected values from the most recent values from each input Observable, or an array of the most recent values from each input Observable.
Combines multiple Observables to create an Observable whose values are calculated from the latest values of each of its input Observables.
Whenever any input Observable emits a value, it computes a formula using the latest values from all the inputs, then emits the output of that formula.

combineLatest combines the values from all the Observables passed as
arguments. This is done by subscribing to each Observable, in order, and
collecting an array of each of the most recent values any time any of the
input Observables emits, then either taking that array and passing it as
arguments to an optional project function and emitting the return value of
that, or just emitting the array of recent values directly if there is no
project function.
An Observable of projected values from the most recent values from each input Observable, or an array of the most recent values from each input Observable.
Combines multiple Observables to create an Observable whose values are calculated from the latest values of each of its input Observables.
Whenever any input Observable emits a value, it computes a formula using the latest values from all the inputs, then emits the output of that formula.

combineLatest combines the values from all the Observables passed as
arguments. This is done by subscribing to each Observable, in order, and
collecting an array of each of the most recent values any time any of the
input Observables emits, then either taking that array and passing it as
arguments to an optional project function and emitting the return value of
that, or just emitting the array of recent values directly if there is no
project function.
An Observable of projected values from the most recent values from each input Observable, or an array of the most recent values from each input Observable.
Combines multiple Observables to create an Observable whose values are calculated from the latest values of each of its input Observables.
Whenever any input Observable emits a value, it computes a formula using the latest values from all the inputs, then emits the output of that formula.

combineLatest combines the values from all the Observables passed as
arguments. This is done by subscribing to each Observable, in order, and
collecting an array of each of the most recent values any time any of the
input Observables emits, then either taking that array and passing it as
arguments to an optional project function and emitting the return value of
that, or just emitting the array of recent values directly if there is no
project function.
An Observable of projected values from the most recent values from each input Observable, or an array of the most recent values from each input Observable.
A normalized AJAX error.
We need this JSDoc comment for affecting ESDoc.
An interop point defined by the es7-observable spec https://github.com/zenparsing/es-observable
this instance of the observable
a handler for each value emitted by the observable
a promise that either resolves on observable completion or rejects with the handled error
Creates a new Observable, with this Observable as the source, and the passed operator defined as the new observable's operator.
the operator defining the operation to take on the observable
a new observable with the Operator applied
Registers handlers for handling emitted values, error and completions from the observable, and executes the observable's subscriber function, which will take action to set up the underlying data stream
(optional) either an observer defining all functions to be called, or the first of three possible handlers, which is the handler for each value emitted from the observable.
(optional) a handler for a terminal event resulting from an error. If no error handler is provided, the error will be thrown as unhandled
(optional) a handler for a terminal event resulting from successful completion.
a subscription reference to the registered handlers
Creates an observable for an Ajax request with either a request object with url, headers, etc or a string for a URL.
An observable sequence containing the XMLHttpRequest.
A normalized AJAX response.
We need this JSDoc comment for affecting ESDoc.
A flag to indicate whether this Subscription has already been unsubscribed.
Adds a tear down to be called during the unsubscribe() of this Subscription.
If the tear down being added is a subscription that is already
unsubscribed, is the same reference add is being called on, or is
Subscription.EMPTY, it will not be added.
If this subscription is already in an isUnsubscribed state, the passed
tear down logic will be executed immediately.
The additional logic to execute on teardown.
Returns the Subscription used or created to be
added to the inner subscriptions list. This Subscription can be used with
remove() to remove the passed teardown logic from the inner subscriptions
list.
The Observer callback to receive a valueless notification of type
complete from the Observable. Notifies the Observer that the Observable
has finished sending push-based notifications.
Removes a Subscription from the internal list of subscriptions that will unsubscribe during the unsubscribe process of this Subscription.
The subscription to remove.
A static factory for a Subscriber, given a (potentially partial) definition of an Observer.
A Subscriber wrapping the (partially defined) Observer represented by the given arguments.
We need this JSDoc comment for affecting ESDoc.
a handler for each value emitted by the observable
a promise that either resolves on observable completion or rejects with the handled error
Registers handlers for handling emitted values, error and completions from the observable, and executes the observable's subscriber function, which will take action to set up the underlying data stream
(optional) either an observer defining all functions to be called, or the first of three possible handlers, which is the handler for each value emitted from the observable.
(optional) a handler for a terminal event resulting from an error. If no error handler is provided, the error will be thrown as unhandled
(optional) a handler for a terminal event resulting from successful completion.
a subscription reference to the registered handlers
We need this JSDoc comment for affecting ESDoc.
A flag to indicate whether this Subscription has already been unsubscribed.
Adds a tear down to be called during the unsubscribe() of this Subscription.
If the tear down being added is a subscription that is already
unsubscribed, is the same reference add is being called on, or is
Subscription.EMPTY, it will not be added.
If this subscription is already in an isUnsubscribed state, the passed
tear down logic will be executed immediately.
The additional logic to execute on teardown.
Returns the Subscription used or created to be
added to the inner subscriptions list. This Subscription can be used with
remove() to remove the passed teardown logic from the inner subscriptions
list.
The Observer callback to receive a valueless notification of type
complete from the Observable. Notifies the Observer that the Observable
has finished sending push-based notifications.
The Observer callback to receive notifications of type next from
the Observable, with a value. The Observable may call this method 0 or more
times.
Removes a Subscription from the internal list of subscriptions that will unsubscribe during the unsubscribe process of this Subscription.
The subscription to remove.
A static factory for a Subscriber, given a (potentially partial) definition of an Observer.
A Subscriber wrapping the (partially defined) Observer represented by the given arguments.
Ignores source values for a duration determined by another Observable, then emits the most recent value from the source Observable, then repeats this process.
It's like auditTime, but the silencing duration is determined by a second Observable.

audit is similar to throttle, but emits the last value from the silenced
time window, instead of the first value. audit emits the most recent value
from the source Observable on the output Observable as soon as its internal
timer becomes disabled, and ignores source values while the timer is enabled.
Initially, the timer is disabled. As soon as the first source value arrives,
the timer is enabled by calling the durationSelector function with the
source value, which returns the "duration" Observable. When the duration
Observable emits a value or completes, the timer is disabled, then the most
recent source value is emitted on the output Observable, and this process
repeats for the next source value.
A function that receives a value from the source Observable, for computing the silencing duration, returned as an Observable or a Promise.
An Observable that performs rate-limiting of emissions from the source Observable.
We need this JSDoc comment for affecting ESDoc.
A flag to indicate whether this Subscription has already been unsubscribed.
Adds a tear down to be called during the unsubscribe() of this Subscription.
If the tear down being added is a subscription that is already
unsubscribed, is the same reference add is being called on, or is
Subscription.EMPTY, it will not be added.
If this subscription is already in an isUnsubscribed state, the passed
tear down logic will be executed immediately.
The additional logic to execute on teardown.
Returns the Subscription used or created to be
added to the inner subscriptions list. This Subscription can be used with
remove() to remove the passed teardown logic from the inner subscriptions
list.
The Observer callback to receive a valueless notification of type
complete from the Observable. Notifies the Observer that the Observable
has finished sending push-based notifications.
The Observer callback to receive notifications of type next from
the Observable, with a value. The Observable may call this method 0 or more
times.
Removes a Subscription from the internal list of subscriptions that will unsubscribe during the unsubscribe process of this Subscription.
The subscription to remove.
A static factory for a Subscriber, given a (potentially partial) definition of an Observer.
A Subscriber wrapping the (partially defined) Observer represented by the given arguments.
Ignores source values for duration milliseconds, then emits the most recent
value from the source Observable, then repeats this process.
When it sees a source values, it ignores that plus
the next ones for duration milliseconds, and then it emits the most recent
value from the source.

auditTime is similar to throttleTime, but emits the last value from the
silenced time window, instead of the first value. auditTime emits the most
recent value from the source Observable on the output Observable as soon as
its internal timer becomes disabled, and ignores source values while the
timer is enabled. Initially, the timer is disabled. As soon as the first
source value arrives, the timer is enabled. After duration milliseconds (or
the time unit determined internally by the optional scheduler) has passed,
the timer is disabled, then the most recent source value is emitted on the
output Observable, and this process repeats for the next source value.
Optionally takes a Scheduler for managing timers.
Time to wait before emitting the most recent source
value, measured in milliseconds or the time unit determined internally
by the optional scheduler.
An Observable that performs rate-limiting of emissions from the source Observable.
We need this JSDoc comment for affecting ESDoc.
A flag to indicate whether this Subscription has already been unsubscribed.
Adds a tear down to be called during the unsubscribe() of this Subscription.
If the tear down being added is a subscription that is already
unsubscribed, is the same reference add is being called on, or is
Subscription.EMPTY, it will not be added.
If this subscription is already in an isUnsubscribed state, the passed
tear down logic will be executed immediately.
The additional logic to execute on teardown.
Returns the Subscription used or created to be
added to the inner subscriptions list. This Subscription can be used with
remove() to remove the passed teardown logic from the inner subscriptions
list.
The Observer callback to receive a valueless notification of type
complete from the Observable. Notifies the Observer that the Observable
has finished sending push-based notifications.
The Observer callback to receive notifications of type next from
the Observable, with a value. The Observable may call this method 0 or more
times.
Removes a Subscription from the internal list of subscriptions that will unsubscribe during the unsubscribe process of this Subscription.
The subscription to remove.
A static factory for a Subscriber, given a (potentially partial) definition of an Observer.
A Subscriber wrapping the (partially defined) Observer represented by the given arguments.
Buffers the source Observable values until closingNotifier emits.
Collects values from the past as an array, and emits that array only when another Observable emits.

Buffers the incoming Observable values until the given closingNotifier
Observable emits a value, at which point it emits the buffer on the output
Observable and starts a new buffer internally, awaiting the next time
closingNotifier emits.
An Observable that signals the buffer to be emitted on the output Observable.
An Observable of buffers, which are arrays of values.
We need this JSDoc comment for affecting ESDoc.
A flag to indicate whether this Subscription has already been unsubscribed.
Adds a tear down to be called during the unsubscribe() of this Subscription.
If the tear down being added is a subscription that is already
unsubscribed, is the same reference add is being called on, or is
Subscription.EMPTY, it will not be added.
If this subscription is already in an isUnsubscribed state, the passed
tear down logic will be executed immediately.
The additional logic to execute on teardown.
Returns the Subscription used or created to be
added to the inner subscriptions list. This Subscription can be used with
remove() to remove the passed teardown logic from the inner subscriptions
list.
The Observer callback to receive a valueless notification of type
complete from the Observable. Notifies the Observer that the Observable
has finished sending push-based notifications.
The Observer callback to receive notifications of type next from
the Observable, with a value. The Observable may call this method 0 or more
times.
Removes a Subscription from the internal list of subscriptions that will unsubscribe during the unsubscribe process of this Subscription.
The subscription to remove.
A static factory for a Subscriber, given a (potentially partial) definition of an Observer.
A Subscriber wrapping the (partially defined) Observer represented by the given arguments.
Buffers the source Observable values until the size hits the maximum
bufferSize given.
Collects values from the past as an array, and emits
that array only when its size reaches bufferSize.

Buffers a number of values from the source Observable by bufferSize then
emits the buffer and clears it, and starts a new buffer each
startBufferEvery values. If startBufferEvery is not provided or is
null, then new buffers are started immediately at the start of the source
and when each buffer closes and is emitted.
The maximum size of the buffer emitted.
An Observable of arrays of buffered values.
We need this JSDoc comment for affecting ESDoc.
A flag to indicate whether this Subscription has already been unsubscribed.
Adds a tear down to be called during the unsubscribe() of this Subscription.
If the tear down being added is a subscription that is already
unsubscribed, is the same reference add is being called on, or is
Subscription.EMPTY, it will not be added.
If this subscription is already in an isUnsubscribed state, the passed
tear down logic will be executed immediately.
The additional logic to execute on teardown.
Returns the Subscription used or created to be
added to the inner subscriptions list. This Subscription can be used with
remove() to remove the passed teardown logic from the inner subscriptions
list.
The Observer callback to receive a valueless notification of type
complete from the Observable. Notifies the Observer that the Observable
has finished sending push-based notifications.
The Observer callback to receive notifications of type next from
the Observable, with a value. The Observable may call this method 0 or more
times.
Removes a Subscription from the internal list of subscriptions that will unsubscribe during the unsubscribe process of this Subscription.
The subscription to remove.
A static factory for a Subscriber, given a (potentially partial) definition of an Observer.
A Subscriber wrapping the (partially defined) Observer represented by the given arguments.
Buffers the source Observable values for a specific time period.
Collects values from the past as an array, and emits those arrays periodically in time.

Buffers values from the source for a specific time duration bufferTimeSpan.
Unless the optional argument bufferCreationInterval is given, it emits and
resets the buffer every bufferTimeSpan milliseconds. If
bufferCreationInterval is given, this operator opens the buffer every
bufferCreationInterval milliseconds and closes (emits and resets) the
buffer every bufferTimeSpan milliseconds. When the optional argument
maxBufferSize is specified, the buffer will be closed either after
bufferTimeSpan milliseconds or when it contains maxBufferSize elements.
The amount of time to fill each buffer array.
An observable of arrays of buffered values.
We need this JSDoc comment for affecting ESDoc.
A flag to indicate whether this Subscription has already been unsubscribed.
Adds a tear down to be called during the unsubscribe() of this Subscription.
If the tear down being added is a subscription that is already
unsubscribed, is the same reference add is being called on, or is
Subscription.EMPTY, it will not be added.
If this subscription is already in an isUnsubscribed state, the passed
tear down logic will be executed immediately.
The additional logic to execute on teardown.
Returns the Subscription used or created to be
added to the inner subscriptions list. This Subscription can be used with
remove() to remove the passed teardown logic from the inner subscriptions
list.
The Observer callback to receive a valueless notification of type
complete from the Observable. Notifies the Observer that the Observable
has finished sending push-based notifications.
The Observer callback to receive notifications of type next from
the Observable, with a value. The Observable may call this method 0 or more
times.
Removes a Subscription from the internal list of subscriptions that will unsubscribe during the unsubscribe process of this Subscription.
The subscription to remove.
A static factory for a Subscriber, given a (potentially partial) definition of an Observer.
A Subscriber wrapping the (partially defined) Observer represented by the given arguments.
Buffers the source Observable values starting from an emission from
openings and ending when the output of closingSelector emits.
Collects values from the past as an array. Starts
collecting only when opening emits, and calls the closingSelector
function to get an Observable that tells when to close the buffer.

Buffers values from the source by opening the buffer via signals from an
Observable provided to openings, and closing and sending the buffers when
a Subscribable or Promise returned by the closingSelector function emits.
A Subscribable or Promise of notifications to start new buffers.
A function that takes
the value emitted by the openings observable and returns a Subscribable or Promise,
which, when it emits, signals that the associated buffer should be emitted
and cleared.
An observable of arrays of buffered values.
We need this JSDoc comment for affecting ESDoc.
A flag to indicate whether this Subscription has already been unsubscribed.
Adds a tear down to be called during the unsubscribe() of this Subscription.
If the tear down being added is a subscription that is already
unsubscribed, is the same reference add is being called on, or is
Subscription.EMPTY, it will not be added.
If this subscription is already in an isUnsubscribed state, the passed
tear down logic will be executed immediately.
The additional logic to execute on teardown.
Returns the Subscription used or created to be
added to the inner subscriptions list. This Subscription can be used with
remove() to remove the passed teardown logic from the inner subscriptions
list.
The Observer callback to receive a valueless notification of type
complete from the Observable. Notifies the Observer that the Observable
has finished sending push-based notifications.
The Observer callback to receive notifications of type next from
the Observable, with a value. The Observable may call this method 0 or more
times.
Removes a Subscription from the internal list of subscriptions that will unsubscribe during the unsubscribe process of this Subscription.
The subscription to remove.
A static factory for a Subscriber, given a (potentially partial) definition of an Observer.
A Subscriber wrapping the (partially defined) Observer represented by the given arguments.
Buffers the source Observable values, using a factory function of closing Observables to determine when to close, emit, and reset the buffer.
Collects values from the past as an array. When it starts collecting values, it calls a function that returns an Observable that tells when to close the buffer and restart collecting.

Opens a buffer immediately, then closes the buffer when the observable
returned by calling closingSelector function emits a value. When it closes
the buffer, it immediately opens a new buffer and repeats the process.
A function that takes no arguments and returns an Observable that signals buffer closure.
An observable of arrays of buffered values.
We need this JSDoc comment for affecting ESDoc.
A flag to indicate whether this Subscription has already been unsubscribed.
Adds a tear down to be called during the unsubscribe() of this Subscription.
If the tear down being added is a subscription that is already
unsubscribed, is the same reference add is being called on, or is
Subscription.EMPTY, it will not be added.
If this subscription is already in an isUnsubscribed state, the passed
tear down logic will be executed immediately.
The additional logic to execute on teardown.
Returns the Subscription used or created to be
added to the inner subscriptions list. This Subscription can be used with
remove() to remove the passed teardown logic from the inner subscriptions
list.
The Observer callback to receive a valueless notification of type
complete from the Observable. Notifies the Observer that the Observable
has finished sending push-based notifications.
The Observer callback to receive notifications of type next from
the Observable, with a value. The Observable may call this method 0 or more
times.
Removes a Subscription from the internal list of subscriptions that will unsubscribe during the unsubscribe process of this Subscription.
The subscription to remove.
A static factory for a Subscriber, given a (potentially partial) definition of an Observer.
A Subscriber wrapping the (partially defined) Observer represented by the given arguments.
Catches errors on the observable to be handled by returning a new observable or throwing an error.
a function that takes as arguments err, which is the error, and caught, which
is the source observable, in case you'd like to "retry" that observable by returning it again. Whatever observable
is returned by the selector will be used to continue the observable chain.
an observable that originates from either the source or the observable returned by the
catch selector function.
Converts a higher-order Observable into a first-order Observable by waiting for the outer Observable to complete, then applying combineLatest.
Flattens an Observable-of-Observables by applying combineLatest when the Observable-of-Observables completes.

Takes an Observable of Observables, and collects all Observables from it. Once the outer Observable completes, it subscribes to all collected Observables and combines their values using the combineLatest strategy, such that:
project function is provided, it is called with each recent value
from each inner Observable in whatever order they arrived, and the result
of the project function is what is emitted by the output Observable.project function, an array of all of the most recent
values is emitted by the output Observable.An Observable of projected results or arrays of recent values.
We need this JSDoc comment for affecting ESDoc.
A flag to indicate whether this Subscription has already been unsubscribed.
Adds a tear down to be called during the unsubscribe() of this Subscription.
If the tear down being added is a subscription that is already
unsubscribed, is the same reference add is being called on, or is
Subscription.EMPTY, it will not be added.
If this subscription is already in an isUnsubscribed state, the passed
tear down logic will be executed immediately.
The additional logic to execute on teardown.
Returns the Subscription used or created to be
added to the inner subscriptions list. This Subscription can be used with
remove() to remove the passed teardown logic from the inner subscriptions
list.
The Observer callback to receive a valueless notification of type
complete from the Observable. Notifies the Observer that the Observable
has finished sending push-based notifications.
The Observer callback to receive notifications of type next from
the Observable, with a value. The Observable may call this method 0 or more
times.
Removes a Subscription from the internal list of subscriptions that will unsubscribe during the unsubscribe process of this Subscription.
The subscription to remove.
A static factory for a Subscriber, given a (potentially partial) definition of an Observer.
A Subscriber wrapping the (partially defined) Observer represented by the given arguments.
Combines multiple Observables to create an Observable whose values are calculated from the latest values of each of its input Observables.
Whenever any input Observable emits a value, it computes a formula using the latest values from all the inputs, then emits the output of that formula.

combineLatest combines the values from this Observable with values from
Observables passed as arguments. This is done by subscribing to each
Observable, in order, and collecting an array of each of the most recent
values any time any of the input Observables emits, then either taking that
array and passing it as arguments to an optional project function and
emitting the return value of that, or just emitting the array of recent
values directly if there is no project function.
An Observable of projected values from the most recent values from each input Observable, or an array of the most recent values from each input Observable.
Creates an output Observable which sequentially emits all values from every given input Observable after the current Observable.
Concatenates multiple Observables together by sequentially emitting their values, one Observable after the other.

Joins this Observable with multiple other Observables by subscribing to them one at a time, starting with the source, and merging their results into the output Observable. Will wait for each Observable to complete before moving on to the next.
All values of each passed Observable merged into a single Observable, in order, in serial fashion.
Creates an output Observable which sequentially emits all values from every given input Observable after the current Observable.
Concatenates multiple Observables together by sequentially emitting their values, one Observable after the other.

Joins multiple Observables together by subscribing to them one at a time and merging their results into the output Observable. Will wait for each Observable to complete before moving on to the next.
All values of each passed Observable merged into a single Observable, in order, in serial fashion.
Creates an output Observable which sequentially emits all values from every given input Observable after the current Observable.
Concatenates multiple Observables together by sequentially emitting their values, one Observable after the other.

Joins multiple Observables together by subscribing to them one at a time and merging their results into the output Observable. Will wait for each Observable to complete before moving on to the next.
All values of each passed Observable merged into a single Observable, in order, in serial fashion.
Creates an output Observable which sequentially emits all values from every given input Observable after the current Observable.
Concatenates multiple Observables together by sequentially emitting their values, one Observable after the other.

Joins multiple Observables together by subscribing to them one at a time and merging their results into the output Observable. Will wait for each Observable to complete before moving on to the next.
All values of each passed Observable merged into a single Observable, in order, in serial fashion.
Creates an output Observable which sequentially emits all values from every given input Observable after the current Observable.
Concatenates multiple Observables together by sequentially emitting their values, one Observable after the other.

Joins multiple Observables together by subscribing to them one at a time and merging their results into the output Observable. Will wait for each Observable to complete before moving on to the next.
All values of each passed Observable merged into a single Observable, in order, in serial fashion.
Creates an output Observable which sequentially emits all values from every given input Observable after the current Observable.
Concatenates multiple Observables together by sequentially emitting their values, one Observable after the other.

Joins multiple Observables together by subscribing to them one at a time and merging their results into the output Observable. Will wait for each Observable to complete before moving on to the next.
All values of each passed Observable merged into a single Observable, in order, in serial fashion.
Creates an output Observable which sequentially emits all values from every given input Observable after the current Observable.
Concatenates multiple Observables together by sequentially emitting their values, one Observable after the other.

Joins multiple Observables together by subscribing to them one at a time and merging their results into the output Observable. Will wait for each Observable to complete before moving on to the next.
All values of each passed Observable merged into a single Observable, in order, in serial fashion.
Creates an output Observable which sequentially emits all values from every given input Observable after the current Observable.
Concatenates multiple Observables together by sequentially emitting their values, one Observable after the other.

Joins multiple Observables together by subscribing to them one at a time and merging their results into the output Observable. Will wait for each Observable to complete before moving on to the next.
All values of each passed Observable merged into a single Observable, in order, in serial fashion.
Creates an output Observable which sequentially emits all values from every given input Observable after the current Observable.
Concatenates multiple Observables together by sequentially emitting their values, one Observable after the other.

Joins multiple Observables together by subscribing to them one at a time and merging their results into the output Observable. Will wait for each Observable to complete before moving on to the next.
All values of each passed Observable merged into a single Observable, in order, in serial fashion.
Converts a higher-order Observable into a first-order Observable by concatenating the inner Observables in order.
Flattens an Observable-of-Observables by putting one inner Observable after the other.

Joins every Observable emitted by the source (a higher-order Observable), in a serial fashion. It subscribes to each inner Observable only after the previous inner Observable has completed, and merges all of their values into the returned observable.
Warning: If the source Observable emits Observables quickly and endlessly, and the inner Observables it emits generally complete slower than the source emits, you can run into memory issues as the incoming Observables collect in an unbounded buffer.
Note: concatAll is equivalent to mergeAll with concurrency parameter set
to 1.
An Observable emitting values from all the inner Observables concatenated.
Projects each source value to an Observable which is merged in the output Observable, in a serialized fashion waiting for each one to complete before merging the next.
Maps each value to an Observable, then flattens all of these inner Observables using concatAll.

Returns an Observable that emits items based on applying a function that you supply to each item emitted by the source Observable, where that function returns an (so-called "inner") Observable. Each new inner Observable is concatenated with the previous inner Observable.
Warning: if source values arrive endlessly and faster than their corresponding inner Observables can complete, it will result in memory issues as inner Observables amass in an unbounded buffer waiting for their turn to be subscribed to.
Note: concatMap is equivalent to mergeMap with concurrency parameter set
to 1.
A function that, when applied to an item emitted by the source Observable, returns an Observable.
an observable of values merged from the projected
Observables as they were subscribed to, one at a time. Optionally, these
values may have been projected from a passed projectResult argument.
Projects each source value to the same Observable which is merged multiple times in a serialized fashion on the output Observable.
It's like concatMap, but maps each value always to the same inner Observable.

Maps each source value to the given Observable innerObservable regardless
of the source value, and then flattens those resulting Observables into one
single Observable, which is the output Observable. Each new innerObservable
instance emitted on the output Observable is concatenated with the previous
innerObservable instance.
Warning: if source values arrive endlessly and faster than their corresponding inner Observables can complete, it will result in memory issues as inner Observables amass in an unbounded buffer waiting for their turn to be subscribed to.
Note: concatMapTo is equivalent to mergeMapTo with concurrency parameter
set to 1.
An Observable to replace each value from the source Observable.
An observable of values merged together by joining the passed observable with itself, one after the other, for each value emitted from the source.
We need this JSDoc comment for affecting ESDoc.
A flag to indicate whether this Subscription has already been unsubscribed.
Adds a tear down to be called during the unsubscribe() of this Subscription.
If the tear down being added is a subscription that is already
unsubscribed, is the same reference add is being called on, or is
Subscription.EMPTY, it will not be added.
If this subscription is already in an isUnsubscribed state, the passed
tear down logic will be executed immediately.
The additional logic to execute on teardown.
Returns the Subscription used or created to be
added to the inner subscriptions list. This Subscription can be used with
remove() to remove the passed teardown logic from the inner subscriptions
list.
The Observer callback to receive a valueless notification of type
complete from the Observable. Notifies the Observer that the Observable
has finished sending push-based notifications.
The Observer callback to receive notifications of type next from
the Observable, with a value. The Observable may call this method 0 or more
times.
Removes a Subscription from the internal list of subscriptions that will unsubscribe during the unsubscribe process of this Subscription.
The subscription to remove.
A static factory for a Subscriber, given a (potentially partial) definition of an Observer.
A Subscriber wrapping the (partially defined) Observer represented by the given arguments.
Counts the number of emissions on the source and emits that number when the source completes.
Tells how many values were emitted, when the source completes.

count transforms an Observable that emits values into an Observable that
emits a single value that represents the number of values emitted by the
source Observable. If the source Observable terminates with an error, count
will pass this error notification along without emitting an value first. If
the source Observable does not terminate at all, count will neither emit
a value nor terminate. This operator takes an optional predicate function
as argument, in which case the output emission will represent the number of
source values that matched true with the predicate.
An Observable of one number that represents the count as described above.
We need this JSDoc comment for affecting ESDoc.
A flag to indicate whether this Subscription has already been unsubscribed.
Adds a tear down to be called during the unsubscribe() of this Subscription.
If the tear down being added is a subscription that is already
unsubscribed, is the same reference add is being called on, or is
Subscription.EMPTY, it will not be added.
If this subscription is already in an isUnsubscribed state, the passed
tear down logic will be executed immediately.
The additional logic to execute on teardown.
Returns the Subscription used or created to be
added to the inner subscriptions list. This Subscription can be used with
remove() to remove the passed teardown logic from the inner subscriptions
list.
The Observer callback to receive a valueless notification of type
complete from the Observable. Notifies the Observer that the Observable
has finished sending push-based notifications.
The Observer callback to receive notifications of type next from
the Observable, with a value. The Observable may call this method 0 or more
times.
Removes a Subscription from the internal list of subscriptions that will unsubscribe during the unsubscribe process of this Subscription.
The subscription to remove.
A static factory for a Subscriber, given a (potentially partial) definition of an Observer.
A Subscriber wrapping the (partially defined) Observer represented by the given arguments.
Emits a value from the source Observable only after a particular time span determined by another Observable has passed without another source emission.
It's like debounceTime, but the time span of emission silence is determined by a second Observable.

debounce delays values emitted by the source Observable, but drops previous
pending delayed emissions if a new value arrives on the source Observable.
This operator keeps track of the most recent value from the source
Observable, and spawns a duration Observable by calling the
durationSelector function. The value is emitted only when the duration
Observable emits a value or completes, and if no other value was emitted on
the source Observable since the duration Observable was spawned. If a new
value appears before the duration Observable emits, the previous value will
be dropped and will not be emitted on the output Observable.
Like debounceTime, this is a rate-limiting operator, and also a delay-like operator since output emissions do not necessarily occur at the same time as they did on the source Observable.
A function that receives a value from the source Observable, for computing the timeout duration for each source value, returned as an Observable or a Promise.
An Observable that delays the emissions of the source
Observable by the specified duration Observable returned by
durationSelector, and may drop some values if they occur too frequently.
We need this JSDoc comment for affecting ESDoc.
A flag to indicate whether this Subscription has already been unsubscribed.
Adds a tear down to be called during the unsubscribe() of this Subscription.
If the tear down being added is a subscription that is already
unsubscribed, is the same reference add is being called on, or is
Subscription.EMPTY, it will not be added.
If this subscription is already in an isUnsubscribed state, the passed
tear down logic will be executed immediately.
The additional logic to execute on teardown.
Returns the Subscription used or created to be
added to the inner subscriptions list. This Subscription can be used with
remove() to remove the passed teardown logic from the inner subscriptions
list.
The Observer callback to receive a valueless notification of type
complete from the Observable. Notifies the Observer that the Observable
has finished sending push-based notifications.
The Observer callback to receive notifications of type next from
the Observable, with a value. The Observable may call this method 0 or more
times.
Removes a Subscription from the internal list of subscriptions that will unsubscribe during the unsubscribe process of this Subscription.
The subscription to remove.
A static factory for a Subscriber, given a (potentially partial) definition of an Observer.
A Subscriber wrapping the (partially defined) Observer represented by the given arguments.
Emits a value from the source Observable only after a particular time span has passed without another source emission.
It's like delay, but passes only the most recent value from each burst of emissions.

debounceTime delays values emitted by the source Observable, but drops
previous pending delayed emissions if a new value arrives on the source
Observable. This operator keeps track of the most recent value from the
source Observable, and emits that only when dueTime enough time has passed
without any other value appearing on the source Observable. If a new value
appears before dueTime silence occurs, the previous value will be dropped
and will not be emitted on the output Observable.
This is a rate-limiting operator, because it is impossible for more than one
value to be emitted in any time window of duration dueTime, but it is also
a delay-like operator since output emissions do not occur at the same time as
they did on the source Observable. Optionally takes a Scheduler for
managing timers.
The timeout duration in milliseconds (or the time
unit determined internally by the optional scheduler) for the window of
time required to wait for emission silence before emitting the most recent
source value.
An Observable that delays the emissions of the source
Observable by the specified dueTime, and may drop some values if they occur
too frequently.
We need this JSDoc comment for affecting ESDoc.
A flag to indicate whether this Subscription has already been unsubscribed.
Adds a tear down to be called during the unsubscribe() of this Subscription.
If the tear down being added is a subscription that is already
unsubscribed, is the same reference add is being called on, or is
Subscription.EMPTY, it will not be added.
If this subscription is already in an isUnsubscribed state, the passed
tear down logic will be executed immediately.
The additional logic to execute on teardown.
Returns the Subscription used or created to be
added to the inner subscriptions list. This Subscription can be used with
remove() to remove the passed teardown logic from the inner subscriptions
list.
The Observer callback to receive a valueless notification of type
complete from the Observable. Notifies the Observer that the Observable
has finished sending push-based notifications.
The Observer callback to receive notifications of type next from
the Observable, with a value. The Observable may call this method 0 or more
times.
Removes a Subscription from the internal list of subscriptions that will unsubscribe during the unsubscribe process of this Subscription.
The subscription to remove.
A static factory for a Subscriber, given a (potentially partial) definition of an Observer.
A Subscriber wrapping the (partially defined) Observer represented by the given arguments.
Emits a given value if the source Observable completes without emitting any
next value, otherwise mirrors the source Observable.
If the source Observable turns out to be empty, then this operator will emit a default value.

defaultIfEmpty emits the values emitted by the source Observable or a
specified default value if the source Observable is empty (completes without
having emitted any next value).
An Observable that emits either the specified
defaultValue if the source Observable emits no items, or the values emitted
by the source Observable.
We need this JSDoc comment for affecting ESDoc.
A flag to indicate whether this Subscription has already been unsubscribed.
Adds a tear down to be called during the unsubscribe() of this Subscription.
If the tear down being added is a subscription that is already
unsubscribed, is the same reference add is being called on, or is
Subscription.EMPTY, it will not be added.
If this subscription is already in an isUnsubscribed state, the passed
tear down logic will be executed immediately.
The additional logic to execute on teardown.
Returns the Subscription used or created to be
added to the inner subscriptions list. This Subscription can be used with
remove() to remove the passed teardown logic from the inner subscriptions
list.
The Observer callback to receive a valueless notification of type
complete from the Observable. Notifies the Observer that the Observable
has finished sending push-based notifications.
The Observer callback to receive notifications of type next from
the Observable, with a value. The Observable may call this method 0 or more
times.
Removes a Subscription from the internal list of subscriptions that will unsubscribe during the unsubscribe process of this Subscription.
The subscription to remove.
A static factory for a Subscriber, given a (potentially partial) definition of an Observer.
A Subscriber wrapping the (partially defined) Observer represented by the given arguments.
Delays the emission of items from the source Observable by a given timeout or until a given Date.
Time shifts each item by some specified amount of milliseconds.

If the delay argument is a Number, this operator time shifts the source Observable by that amount of time expressed in milliseconds. The relative time intervals between the values are preserved.
If the delay argument is a Date, this operator time shifts the start of the Observable execution until the given date occurs.
The delay duration in milliseconds (a number) or
a Date until which the emission of the source items is delayed.
An Observable that delays the emissions of the source Observable by the specified timeout or Date.
We need this JSDoc comment for affecting ESDoc.
A flag to indicate whether this Subscription has already been unsubscribed.
Adds a tear down to be called during the unsubscribe() of this Subscription.
If the tear down being added is a subscription that is already
unsubscribed, is the same reference add is being called on, or is
Subscription.EMPTY, it will not be added.
If this subscription is already in an isUnsubscribed state, the passed
tear down logic will be executed immediately.
The additional logic to execute on teardown.
Returns the Subscription used or created to be
added to the inner subscriptions list. This Subscription can be used with
remove() to remove the passed teardown logic from the inner subscriptions
list.
The Observer callback to receive a valueless notification of type
complete from the Observable. Notifies the Observer that the Observable
has finished sending push-based notifications.
The Observer callback to receive notifications of type next from
the Observable, with a value. The Observable may call this method 0 or more
times.
Removes a Subscription from the internal list of subscriptions that will unsubscribe during the unsubscribe process of this Subscription.
The subscription to remove.
A static factory for a Subscriber, given a (potentially partial) definition of an Observer.
A Subscriber wrapping the (partially defined) Observer represented by the given arguments.
We need this JSDoc comment for affecting ESDoc.
An interop point defined by the es7-observable spec https://github.com/zenparsing/es-observable
this instance of the observable
a handler for each value emitted by the observable
a promise that either resolves on observable completion or rejects with the handled error
Creates a new Observable, with this Observable as the source, and the passed operator defined as the new observable's operator.
the operator defining the operation to take on the observable
a new observable with the Operator applied
Registers handlers for handling emitted values, error and completions from the observable, and executes the observable's subscriber function, which will take action to set up the underlying data stream
(optional) either an observer defining all functions to be called, or the first of three possible handlers, which is the handler for each value emitted from the observable.
(optional) a handler for a terminal event resulting from an error. If no error handler is provided, the error will be thrown as unhandled
(optional) a handler for a terminal event resulting from successful completion.
a subscription reference to the registered handlers
Creates a new cold Observable by calling the Observable constructor
a new cold observable
We need this JSDoc comment for affecting ESDoc.
A flag to indicate whether this Subscription has already been unsubscribed.
Adds a tear down to be called during the unsubscribe() of this Subscription.
If the tear down being added is a subscription that is already
unsubscribed, is the same reference add is being called on, or is
Subscription.EMPTY, it will not be added.
If this subscription is already in an isUnsubscribed state, the passed
tear down logic will be executed immediately.
The additional logic to execute on teardown.
Returns the Subscription used or created to be
added to the inner subscriptions list. This Subscription can be used with
remove() to remove the passed teardown logic from the inner subscriptions
list.
The Observer callback to receive a valueless notification of type
complete from the Observable. Notifies the Observer that the Observable
has finished sending push-based notifications.
The Observer callback to receive notifications of type next from
the Observable, with a value. The Observable may call this method 0 or more
times.
Removes a Subscription from the internal list of subscriptions that will unsubscribe during the unsubscribe process of this Subscription.
The subscription to remove.
A static factory for a Subscriber, given a (potentially partial) definition of an Observer.
A Subscriber wrapping the (partially defined) Observer represented by the given arguments.
Delays the emission of items from the source Observable by a given time span determined by the emissions of another Observable.
It's like delay, but the time span of the delay duration is determined by a second Observable.

delayWhen time shifts each emitted value from the source Observable by a
time span determined by another Observable. When the source emits a value,
the delayDurationSelector function is called with the source value as
argument, and should return an Observable, called the "duration" Observable.
The source value is emitted on the output Observable only when the duration
Observable emits a value or completes.
Optionally, delayWhen takes a second argument, subscriptionDelay, which
is an Observable. When subscriptionDelay emits its first value or
completes, the source Observable is subscribed to and starts behaving like
described in the previous paragraph. If subscriptionDelay is not provided,
delayWhen will subscribe to the source Observable as soon as the output
Observable is subscribed.
A function that returns an Observable for each value emitted by the source Observable, which is then used to delay the emission of that item on the output Observable until the Observable returned from this function emits a value.
An Observable that triggers the subscription to the source Observable once it emits any value.
An Observable that delays the emissions of the source
Observable by an amount of time specified by the Observable returned by
delayDurationSelector.
We need this JSDoc comment for affecting ESDoc.
A flag to indicate whether this Subscription has already been unsubscribed.
Adds a tear down to be called during the unsubscribe() of this Subscription.
If the tear down being added is a subscription that is already
unsubscribed, is the same reference add is being called on, or is
Subscription.EMPTY, it will not be added.
If this subscription is already in an isUnsubscribed state, the passed
tear down logic will be executed immediately.
The additional logic to execute on teardown.
Returns the Subscription used or created to be
added to the inner subscriptions list. This Subscription can be used with
remove() to remove the passed teardown logic from the inner subscriptions
list.
The Observer callback to receive a valueless notification of type
complete from the Observable. Notifies the Observer that the Observable
has finished sending push-based notifications.
The Observer callback to receive notifications of type next from
the Observable, with a value. The Observable may call this method 0 or more
times.
Removes a Subscription from the internal list of subscriptions that will unsubscribe during the unsubscribe process of this Subscription.
The subscription to remove.
A static factory for a Subscriber, given a (potentially partial) definition of an Observer.
A Subscriber wrapping the (partially defined) Observer represented by the given arguments.
Converts an Observable of Notification objects into the emissions that they represent.
Unwraps Notification objects as actual next,
error and complete emissions. The opposite of materialize.

dematerialize is assumed to operate an Observable that only emits
Notification objects as next emissions, and does not emit any
error. Such Observable is the output of a materialize operation. Those
notifications are then unwrapped using the metadata they contain, and emitted
as next, error, and complete on the output Observable.
Use this operator in conjunction with materialize.
An Observable that emits items and notifications embedded in Notification objects emitted by the source Observable.
We need this JSDoc comment for affecting ESDoc.
A flag to indicate whether this Subscription has already been unsubscribed.
Adds a tear down to be called during the unsubscribe() of this Subscription.
If the tear down being added is a subscription that is already
unsubscribed, is the same reference add is being called on, or is
Subscription.EMPTY, it will not be added.
If this subscription is already in an isUnsubscribed state, the passed
tear down logic will be executed immediately.
The additional logic to execute on teardown.
Returns the Subscription used or created to be
added to the inner subscriptions list. This Subscription can be used with
remove() to remove the passed teardown logic from the inner subscriptions
list.
The Observer callback to receive a valueless notification of type
complete from the Observable. Notifies the Observer that the Observable
has finished sending push-based notifications.
The Observer callback to receive notifications of type next from
the Observable, with a value. The Observable may call this method 0 or more
times.
Removes a Subscription from the internal list of subscriptions that will unsubscribe during the unsubscribe process of this Subscription.
The subscription to remove.
A static factory for a Subscriber, given a (potentially partial) definition of an Observer.
A Subscriber wrapping the (partially defined) Observer represented by the given arguments.
Returns an Observable that emits all items emitted by the source Observable that are distinct by comparison from previous items. If a comparator function is provided, then it will be called for each item to test for whether or not that value should be emitted. If a comparator function is not provided, an equality check is used by default. As the internal HashSet of this operator grows larger and larger, care should be taken in the domain of inputs this operator may see. An optional parameter is also provided such that an Observable can be provided to queue the internal HashSet to flush the values it holds.
an Observable that emits items from the source Observable with distinct values.
Returns an Observable that emits all items emitted by the source Observable that are distinct by comparison from previous items, using a property accessed by using the key provided to check if the two items are distinct. If a comparator function is provided, then it will be called for each item to test for whether or not that value should be emitted. If a comparator function is not provided, an equality check is used by default. As the internal HashSet of this operator grows larger and larger, care should be taken in the domain of inputs this operator may see. An optional parameter is also provided such that an Observable can be provided to queue the internal HashSet to flush the values it holds.
string key for object property lookup on each item.
an Observable that emits items from the source Observable with distinct values.
We need this JSDoc comment for affecting ESDoc.
A flag to indicate whether this Subscription has already been unsubscribed.
Adds a tear down to be called during the unsubscribe() of this Subscription.
If the tear down being added is a subscription that is already
unsubscribed, is the same reference add is being called on, or is
Subscription.EMPTY, it will not be added.
If this subscription is already in an isUnsubscribed state, the passed
tear down logic will be executed immediately.
The additional logic to execute on teardown.
Returns the Subscription used or created to be
added to the inner subscriptions list. This Subscription can be used with
remove() to remove the passed teardown logic from the inner subscriptions
list.
The Observer callback to receive a valueless notification of type
complete from the Observable. Notifies the Observer that the Observable
has finished sending push-based notifications.
The Observer callback to receive notifications of type next from
the Observable, with a value. The Observable may call this method 0 or more
times.
Removes a Subscription from the internal list of subscriptions that will unsubscribe during the unsubscribe process of this Subscription.
The subscription to remove.
A static factory for a Subscriber, given a (potentially partial) definition of an Observer.
A Subscriber wrapping the (partially defined) Observer represented by the given arguments.
Returns an Observable that emits all items emitted by the source Observable that are distinct by comparison from the previous item. If a comparator function is provided, then it will be called for each item to test for whether or not that value should be emitted. If a comparator function is not provided, an equality check is used by default.
an Observable that emits items from the source Observable with distinct values.
Returns an Observable that emits all items emitted by the source Observable that are distinct by comparison from the previous item, using a property accessed by using the key provided to check if the two items are distinct. If a comparator function is provided, then it will be called for each item to test for whether or not that value should be emitted. If a comparator function is not provided, an equality check is used by default.
string key for object property lookup on each item.
an Observable that emits items from the source Observable with distinct values based on the key specified.
We need this JSDoc comment for affecting ESDoc.
A flag to indicate whether this Subscription has already been unsubscribed.
Adds a tear down to be called during the unsubscribe() of this Subscription.
If the tear down being added is a subscription that is already
unsubscribed, is the same reference add is being called on, or is
Subscription.EMPTY, it will not be added.
If this subscription is already in an isUnsubscribed state, the passed
tear down logic will be executed immediately.
The additional logic to execute on teardown.
Returns the Subscription used or created to be
added to the inner subscriptions list. This Subscription can be used with
remove() to remove the passed teardown logic from the inner subscriptions
list.
The Observer callback to receive a valueless notification of type
complete from the Observable. Notifies the Observer that the Observable
has finished sending push-based notifications.
The Observer callback to receive notifications of type next from
the Observable, with a value. The Observable may call this method 0 or more
times.
Removes a Subscription from the internal list of subscriptions that will unsubscribe during the unsubscribe process of this Subscription.
The subscription to remove.
A static factory for a Subscriber, given a (potentially partial) definition of an Observer.
A Subscriber wrapping the (partially defined) Observer represented by the given arguments.
Perform a side effect for every emission on the source Observable, but return an Observable that is identical to the source.
Intercepts each emission on the source and runs a function, but returns an output which is identical to the source.

Returns a mirrored Observable of the source Observable, but modified so that the provided Observer is called to perform a side effect for every value, error, and completion emitted by the source. Any errors that are thrown in the aforementioned Observer or handlers are safely sent down the error path of the output Observable.
This operator is useful for debugging your Observables for the correct values or performing other side effects.
Note: this is different to a subscribe on the Observable. If the Observable
returned by do is not subscribed, the side effects specified by the
Observer will never happen. do therefore simply spies on existing
execution, it does not trigger an execution to happen like subscribe does.
An Observable identical to the source, but runs the specified Observer or callback(s) for each item.
We need this JSDoc comment for affecting ESDoc.
A flag to indicate whether this Subscription has already been unsubscribed.
Adds a tear down to be called during the unsubscribe() of this Subscription.
If the tear down being added is a subscription that is already
unsubscribed, is the same reference add is being called on, or is
Subscription.EMPTY, it will not be added.
If this subscription is already in an isUnsubscribed state, the passed
tear down logic will be executed immediately.
The additional logic to execute on teardown.
Returns the Subscription used or created to be
added to the inner subscriptions list. This Subscription can be used with
remove() to remove the passed teardown logic from the inner subscriptions
list.
The Observer callback to receive a valueless notification of type
complete from the Observable. Notifies the Observer that the Observable
has finished sending push-based notifications.
The Observer callback to receive notifications of type next from
the Observable, with a value. The Observable may call this method 0 or more
times.
Removes a Subscription from the internal list of subscriptions that will unsubscribe during the unsubscribe process of this Subscription.
The subscription to remove.
A static factory for a Subscriber, given a (potentially partial) definition of an Observer.
A Subscriber wrapping the (partially defined) Observer represented by the given arguments.
Emits the single value at the specified index in a sequence of emissions
from the source Observable.
Emits only the i-th value, then completes.

elementAt returns an Observable that emits the item at the specified
index in the source Observable, or a default value if that index is out
of range and the default argument is provided. If the default argument is
not given and the index is out of range, the output Observable will emit an
ArgumentOutOfRangeError error.
Is the number i for the i-th source emission that has
happened since the subscription, starting from the number 0.
An Observable that emits a single item, if it is found. Otherwise, will emit the default value if given. If not, then emits an error.
We need this JSDoc comment for affecting ESDoc.
A flag to indicate whether this Subscription has already been unsubscribed.
Adds a tear down to be called during the unsubscribe() of this Subscription.
If the tear down being added is a subscription that is already
unsubscribed, is the same reference add is being called on, or is
Subscription.EMPTY, it will not be added.
If this subscription is already in an isUnsubscribed state, the passed
tear down logic will be executed immediately.
The additional logic to execute on teardown.
Returns the Subscription used or created to be
added to the inner subscriptions list. This Subscription can be used with
remove() to remove the passed teardown logic from the inner subscriptions
list.
The Observer callback to receive a valueless notification of type
complete from the Observable. Notifies the Observer that the Observable
has finished sending push-based notifications.
The Observer callback to receive notifications of type next from
the Observable, with a value. The Observable may call this method 0 or more
times.
Removes a Subscription from the internal list of subscriptions that will unsubscribe during the unsubscribe process of this Subscription.
The subscription to remove.
A static factory for a Subscriber, given a (potentially partial) definition of an Observer.
A Subscriber wrapping the (partially defined) Observer represented by the given arguments.
Returns an Observable that emits whether or not every item of the source satisfies the condition specified.
a function for determining if an item meets a specified condition.
an Observable of booleans that determines if all items of the source Observable meet the condition specified.
We need this JSDoc comment for affecting ESDoc.
A flag to indicate whether this Subscription has already been unsubscribed.
Adds a tear down to be called during the unsubscribe() of this Subscription.
If the tear down being added is a subscription that is already
unsubscribed, is the same reference add is being called on, or is
Subscription.EMPTY, it will not be added.
If this subscription is already in an isUnsubscribed state, the passed
tear down logic will be executed immediately.
The additional logic to execute on teardown.
Returns the Subscription used or created to be
added to the inner subscriptions list. This Subscription can be used with
remove() to remove the passed teardown logic from the inner subscriptions
list.
The Observer callback to receive a valueless notification of type
complete from the Observable. Notifies the Observer that the Observable
has finished sending push-based notifications.
The Observer callback to receive notifications of type next from
the Observable, with a value. The Observable may call this method 0 or more
times.
Removes a Subscription from the internal list of subscriptions that will unsubscribe during the unsubscribe process of this Subscription.
The subscription to remove.
A static factory for a Subscriber, given a (potentially partial) definition of an Observer.
A Subscriber wrapping the (partially defined) Observer represented by the given arguments.
Converts a higher-order Observable into a first-order Observable by dropping inner Observables while the previous inner Observable has not yet completed.
Flattens an Observable-of-Observables by dropping the next inner Observables while the current inner is still executing.

exhaust subscribes to an Observable that emits Observables, also known as a
higher-order Observable. Each time it observes one of these emitted inner
Observables, the output Observable begins emitting the items emitted by that
inner Observable. So far, it behaves like mergeAll. However,
exhaust ignores every new inner Observable if the previous Observable has
not yet completed. Once that one completes, it will accept and flatten the
next inner Observable and repeat this process.
Returns an Observable that takes a source of Observables and propagates the first observable exclusively until it completes before subscribing to the next.
We need this JSDoc comment for affecting ESDoc.
A flag to indicate whether this Subscription has already been unsubscribed.
Adds a tear down to be called during the unsubscribe() of this Subscription.
If the tear down being added is a subscription that is already
unsubscribed, is the same reference add is being called on, or is
Subscription.EMPTY, it will not be added.
If this subscription is already in an isUnsubscribed state, the passed
tear down logic will be executed immediately.
The additional logic to execute on teardown.
Returns the Subscription used or created to be
added to the inner subscriptions list. This Subscription can be used with
remove() to remove the passed teardown logic from the inner subscriptions
list.
The Observer callback to receive a valueless notification of type
complete from the Observable. Notifies the Observer that the Observable
has finished sending push-based notifications.
The Observer callback to receive notifications of type next from
the Observable, with a value. The Observable may call this method 0 or more
times.
Removes a Subscription from the internal list of subscriptions that will unsubscribe during the unsubscribe process of this Subscription.
The subscription to remove.
A static factory for a Subscriber, given a (potentially partial) definition of an Observer.
A Subscriber wrapping the (partially defined) Observer represented by the given arguments.
Projects each source value to an Observable which is merged in the output Observable only if the previous projected Observable has completed.
Maps each value to an Observable, then flattens all of these inner Observables using exhaust.

Returns an Observable that emits items based on applying a function that you
supply to each item emitted by the source Observable, where that function
returns an (so-called "inner") Observable. When it projects a source value to
an Observable, the output Observable begins emitting the items emitted by
that projected Observable. However, exhaustMap ignores every new projected
Observable if the previous projected Observable has not yet completed. Once
that one completes, it will accept and flatten the next projected Observable
and repeat this process.
A function that, when applied to an item emitted by the source Observable, returns an Observable.
An Observable containing projected Observables of each item of the source, ignoring projected Observables that start before their preceding Observable has completed.
We need this JSDoc comment for affecting ESDoc.
A flag to indicate whether this Subscription has already been unsubscribed.
Adds a tear down to be called during the unsubscribe() of this Subscription.
If the tear down being added is a subscription that is already
unsubscribed, is the same reference add is being called on, or is
Subscription.EMPTY, it will not be added.
If this subscription is already in an isUnsubscribed state, the passed
tear down logic will be executed immediately.
The additional logic to execute on teardown.
Returns the Subscription used or created to be
added to the inner subscriptions list. This Subscription can be used with
remove() to remove the passed teardown logic from the inner subscriptions
list.
The Observer callback to receive a valueless notification of type
complete from the Observable. Notifies the Observer that the Observable
has finished sending push-based notifications.
The Observer callback to receive notifications of type next from
the Observable, with a value. The Observable may call this method 0 or more
times.
Removes a Subscription from the internal list of subscriptions that will unsubscribe during the unsubscribe process of this Subscription.
The subscription to remove.
A static factory for a Subscriber, given a (potentially partial) definition of an Observer.
A Subscriber wrapping the (partially defined) Observer represented by the given arguments.
Returns an Observable where for each item in the source Observable, the supplied function is applied to each item, resulting in a new value to then be applied again with the function.
the function for projecting the next emitted item of the Observable.
an Observable containing the expansions of the source Observable.
We need this JSDoc comment for affecting ESDoc.
A flag to indicate whether this Subscription has already been unsubscribed.
Adds a tear down to be called during the unsubscribe() of this Subscription.
If the tear down being added is a subscription that is already
unsubscribed, is the same reference add is being called on, or is
Subscription.EMPTY, it will not be added.
If this subscription is already in an isUnsubscribed state, the passed
tear down logic will be executed immediately.
The additional logic to execute on teardown.
Returns the Subscription used or created to be
added to the inner subscriptions list. This Subscription can be used with
remove() to remove the passed teardown logic from the inner subscriptions
list.
The Observer callback to receive a valueless notification of type
complete from the Observable. Notifies the Observer that the Observable
has finished sending push-based notifications.
The Observer callback to receive notifications of type next from
the Observable, with a value. The Observable may call this method 0 or more
times.
Removes a Subscription from the internal list of subscriptions that will unsubscribe during the unsubscribe process of this Subscription.
The subscription to remove.
A static factory for a Subscriber, given a (potentially partial) definition of an Observer.
A Subscriber wrapping the (partially defined) Observer represented by the given arguments.
Filter items emitted by the source Observable by only emitting those that satisfy a specified predicate.
Like Array.prototype.filter(), it only emits a value from the source if it passes a criterion function.

Similar to the well-known Array.prototype.filter method, this operator
takes values from the source Observable, passes them through a predicate
function and only emits those values that yielded true.
A function that
evaluates each value emitted by the source Observable. If it returns true,
the value is emitted, if false the value is not passed to the output
Observable. The index parameter is the number i for the i-th source
emission that has happened since the subscription, starting from the number
0.
An Observable of values from the source that were
allowed by the predicate function.
We need this JSDoc comment for affecting ESDoc.
A flag to indicate whether this Subscription has already been unsubscribed.
Adds a tear down to be called during the unsubscribe() of this Subscription.
If the tear down being added is a subscription that is already
unsubscribed, is the same reference add is being called on, or is
Subscription.EMPTY, it will not be added.
If this subscription is already in an isUnsubscribed state, the passed
tear down logic will be executed immediately.
The additional logic to execute on teardown.
Returns the Subscription used or created to be
added to the inner subscriptions list. This Subscription can be used with
remove() to remove the passed teardown logic from the inner subscriptions
list.
The Observer callback to receive a valueless notification of type
complete from the Observable. Notifies the Observer that the Observable
has finished sending push-based notifications.
The Observer callback to receive notifications of type next from
the Observable, with a value. The Observable may call this method 0 or more
times.
Removes a Subscription from the internal list of subscriptions that will unsubscribe during the unsubscribe process of this Subscription.
The subscription to remove.
A static factory for a Subscriber, given a (potentially partial) definition of an Observer.
A Subscriber wrapping the (partially defined) Observer represented by the given arguments.
Returns an Observable that mirrors the source Observable, but will call a specified function when the source terminates on complete or error.
function to be called when source terminates.
an Observable that mirrors the source, but will call the specified function on termination.
We need this JSDoc comment for affecting ESDoc.
A flag to indicate whether this Subscription has already been unsubscribed.
Adds a tear down to be called during the unsubscribe() of this Subscription.
If the tear down being added is a subscription that is already
unsubscribed, is the same reference add is being called on, or is
Subscription.EMPTY, it will not be added.
If this subscription is already in an isUnsubscribed state, the passed
tear down logic will be executed immediately.
The additional logic to execute on teardown.
Returns the Subscription used or created to be
added to the inner subscriptions list. This Subscription can be used with
remove() to remove the passed teardown logic from the inner subscriptions
list.
The Observer callback to receive a valueless notification of type
complete from the Observable. Notifies the Observer that the Observable
has finished sending push-based notifications.
The Observer callback to receive notifications of type next from
the Observable, with a value. The Observable may call this method 0 or more
times.
Removes a Subscription from the internal list of subscriptions that will unsubscribe during the unsubscribe process of this Subscription.
The subscription to remove.
A static factory for a Subscriber, given a (potentially partial) definition of an Observer.
A Subscriber wrapping the (partially defined) Observer represented by the given arguments.
Emits only the first value emitted by the source Observable that meets some condition.
Finds the first value that passes some test and emits that.

find searches for the first item in the source Observable that matches the
specified condition embodied by the predicate, and returns the first
occurrence in the source. Unlike first, the predicate is required
in find, and does not emit an error if a valid value is not found.
A function called with each item to test for condition matching.
An Observable of the first item that matches the condition.
Emits only the index of the first value emitted by the source Observable that meets some condition.
It's like find, but emits the index of the found value, not the value itself.

findIndex searches for the first item in the source Observable that matches
the specified condition embodied by the predicate, and returns the
(zero-based) index of the first occurrence in the source. Unlike
first, the predicate is required in findIndex, and does not emit
an error if a valid value is not found.
A function called with each item to test for condition matching.
An Observable of the index of the first item that matches the condition.
We need this JSDoc comment for affecting ESDoc.
A flag to indicate whether this Subscription has already been unsubscribed.
Adds a tear down to be called during the unsubscribe() of this Subscription.
If the tear down being added is a subscription that is already
unsubscribed, is the same reference add is being called on, or is
Subscription.EMPTY, it will not be added.
If this subscription is already in an isUnsubscribed state, the passed
tear down logic will be executed immediately.
The additional logic to execute on teardown.
Returns the Subscription used or created to be
added to the inner subscriptions list. This Subscription can be used with
remove() to remove the passed teardown logic from the inner subscriptions
list.
The Observer callback to receive a valueless notification of type
complete from the Observable. Notifies the Observer that the Observable
has finished sending push-based notifications.
The Observer callback to receive notifications of type next from
the Observable, with a value. The Observable may call this method 0 or more
times.
Removes a Subscription from the internal list of subscriptions that will unsubscribe during the unsubscribe process of this Subscription.
The subscription to remove.
A static factory for a Subscriber, given a (potentially partial) definition of an Observer.
A Subscriber wrapping the (partially defined) Observer represented by the given arguments.
Emits only the first value (or the first value that meets some condition) emitted by the source Observable.
Emits only the first value. Or emits only the first value that passes some test.

If called with no arguments, first emits the first value of the source
Observable, then completes. If called with a predicate function, first
emits the first value of the source that matches the specified condition. It
may also take a resultSelector function to produce the output value from
the input value, and a defaultValue to emit in case the source completes
before it is able to emit a valid value. Throws an error if defaultValue
was not provided and a matching element is not found.
an Observable of the first item that matches the condition.
We need this JSDoc comment for affecting ESDoc.
A flag to indicate whether this Subscription has already been unsubscribed.
Adds a tear down to be called during the unsubscribe() of this Subscription.
If the tear down being added is a subscription that is already
unsubscribed, is the same reference add is being called on, or is
Subscription.EMPTY, it will not be added.
If this subscription is already in an isUnsubscribed state, the passed
tear down logic will be executed immediately.
The additional logic to execute on teardown.
Returns the Subscription used or created to be
added to the inner subscriptions list. This Subscription can be used with
remove() to remove the passed teardown logic from the inner subscriptions
list.
The Observer callback to receive a valueless notification of type
complete from the Observable. Notifies the Observer that the Observable
has finished sending push-based notifications.
The Observer callback to receive notifications of type next from
the Observable, with a value. The Observable may call this method 0 or more
times.
Removes a Subscription from the internal list of subscriptions that will unsubscribe during the unsubscribe process of this Subscription.
The subscription to remove.
A static factory for a Subscriber, given a (potentially partial) definition of an Observer.
A Subscriber wrapping the (partially defined) Observer represented by the given arguments.
We need this JSDoc comment for affecting ESDoc.
A flag to indicate whether this Subscription has already been unsubscribed.
Adds a tear down to be called during the unsubscribe() of this Subscription.
If the tear down being added is a subscription that is already
unsubscribed, is the same reference add is being called on, or is
Subscription.EMPTY, it will not be added.
If this subscription is already in an isUnsubscribed state, the passed
tear down logic will be executed immediately.
The additional logic to execute on teardown.
Returns the Subscription used or created to be
added to the inner subscriptions list. This Subscription can be used with
remove() to remove the passed teardown logic from the inner subscriptions
list.
The Observer callback to receive a valueless notification of type
complete from the Observable. Notifies the Observer that the Observable
has finished sending push-based notifications.
The Observer callback to receive notifications of type next from
the Observable, with a value. The Observable may call this method 0 or more
times.
Removes a Subscription from the internal list of subscriptions that will unsubscribe during the unsubscribe process of this Subscription.
The subscription to remove.
A static factory for a Subscriber, given a (potentially partial) definition of an Observer.
A Subscriber wrapping the (partially defined) Observer represented by the given arguments.
An Observable representing values belonging to the same group represented by
a common key. The values emitted by a GroupedObservable come from the source
Observable. The common key is available as the field key on a
GroupedObservable instance.
An interop point defined by the es7-observable spec https://github.com/zenparsing/es-observable
this instance of the observable
a handler for each value emitted by the observable
a promise that either resolves on observable completion or rejects with the handled error
Creates a new Observable, with this Observable as the source, and the passed operator defined as the new observable's operator.
the operator defining the operation to take on the observable
a new observable with the Operator applied
Registers handlers for handling emitted values, error and completions from the observable, and executes the observable's subscriber function, which will take action to set up the underlying data stream
(optional) either an observer defining all functions to be called, or the first of three possible handlers, which is the handler for each value emitted from the observable.
(optional) a handler for a terminal event resulting from an error. If no error handler is provided, the error will be thrown as unhandled
(optional) a handler for a terminal event resulting from successful completion.
a subscription reference to the registered handlers
Creates a new cold Observable by calling the Observable constructor
a new cold observable
We need this JSDoc comment for affecting ESDoc.
A flag to indicate whether this Subscription has already been unsubscribed.
Adds a tear down to be called during the unsubscribe() of this Subscription.
If the tear down being added is a subscription that is already
unsubscribed, is the same reference add is being called on, or is
Subscription.EMPTY, it will not be added.
If this subscription is already in an isUnsubscribed state, the passed
tear down logic will be executed immediately.
The additional logic to execute on teardown.
Returns the Subscription used or created to be
added to the inner subscriptions list. This Subscription can be used with
remove() to remove the passed teardown logic from the inner subscriptions
list.
Removes a Subscription from the internal list of subscriptions that will unsubscribe during the unsubscribe process of this Subscription.
The subscription to remove.
Groups the items emitted by an Observable according to a specified criterion,
and emits these grouped items as GroupedObservables, one
GroupedObservable per group.

a function that extracts the key for each item.
an Observable that emits GroupedObservables, each of which corresponds to a unique key value and each of which emits those items from the source Observable that share that key value.
We need this JSDoc comment for affecting ESDoc.
A flag to indicate whether this Subscription has already been unsubscribed.
Adds a tear down to be called during the unsubscribe() of this Subscription.
If the tear down being added is a subscription that is already
unsubscribed, is the same reference add is being called on, or is
Subscription.EMPTY, it will not be added.
If this subscription is already in an isUnsubscribed state, the passed
tear down logic will be executed immediately.
The additional logic to execute on teardown.
Returns the Subscription used or created to be
added to the inner subscriptions list. This Subscription can be used with
remove() to remove the passed teardown logic from the inner subscriptions
list.
The Observer callback to receive a valueless notification of type
complete from the Observable. Notifies the Observer that the Observable
has finished sending push-based notifications.
The Observer callback to receive notifications of type next from
the Observable, with a value. The Observable may call this method 0 or more
times.
Removes a Subscription from the internal list of subscriptions that will unsubscribe during the unsubscribe process of this Subscription.
The subscription to remove.
A static factory for a Subscriber, given a (potentially partial) definition of an Observer.
A Subscriber wrapping the (partially defined) Observer represented by the given arguments.
Ignores all items emitted by the source Observable and only passes calls of complete or error.

an empty Observable that only calls complete
or error, based on which one is called by the source Observable.
We need this JSDoc comment for affecting ESDoc.
A flag to indicate whether this Subscription has already been unsubscribed.
Adds a tear down to be called during the unsubscribe() of this Subscription.
If the tear down being added is a subscription that is already
unsubscribed, is the same reference add is being called on, or is
Subscription.EMPTY, it will not be added.
If this subscription is already in an isUnsubscribed state, the passed
tear down logic will be executed immediately.
The additional logic to execute on teardown.
Returns the Subscription used or created to be
added to the inner subscriptions list. This Subscription can be used with
remove() to remove the passed teardown logic from the inner subscriptions
list.
The Observer callback to receive a valueless notification of type
complete from the Observable. Notifies the Observer that the Observable
has finished sending push-based notifications.
The Observer callback to receive notifications of type next from
the Observable, with a value. The Observable may call this method 0 or more
times.
Removes a Subscription from the internal list of subscriptions that will unsubscribe during the unsubscribe process of this Subscription.
The subscription to remove.
A static factory for a Subscriber, given a (potentially partial) definition of an Observer.
A Subscriber wrapping the (partially defined) Observer represented by the given arguments.
If the source Observable is empty it returns an Observable that emits true, otherwise it emits false.

an Observable that emits a Boolean.
We need this JSDoc comment for affecting ESDoc.
A flag to indicate whether this Subscription has already been unsubscribed.
Adds a tear down to be called during the unsubscribe() of this Subscription.
If the tear down being added is a subscription that is already
unsubscribed, is the same reference add is being called on, or is
Subscription.EMPTY, it will not be added.
If this subscription is already in an isUnsubscribed state, the passed
tear down logic will be executed immediately.
The additional logic to execute on teardown.
Returns the Subscription used or created to be
added to the inner subscriptions list. This Subscription can be used with
remove() to remove the passed teardown logic from the inner subscriptions
list.
The Observer callback to receive a valueless notification of type
complete from the Observable. Notifies the Observer that the Observable
has finished sending push-based notifications.
The Observer callback to receive notifications of type next from
the Observable, with a value. The Observable may call this method 0 or more
times.
Removes a Subscription from the internal list of subscriptions that will unsubscribe during the unsubscribe process of this Subscription.
The subscription to remove.
A static factory for a Subscriber, given a (potentially partial) definition of an Observer.
A Subscriber wrapping the (partially defined) Observer represented by the given arguments.
Returns an Observable that emits only the last item emitted by the source Observable. It optionally takes a predicate function as a parameter, in which case, rather than emitting the last item from the source Observable, the resulting Observable will emit the last item from the source Observable that satisfies the predicate.

the condition any source emitted item has to satisfy.
an Observable that emits only the last item satisfying the given condition from the source, or an NoSuchElementException if no such items are emitted.
We need this JSDoc comment for affecting ESDoc.
A flag to indicate whether this Subscription has already been unsubscribed.
Adds a tear down to be called during the unsubscribe() of this Subscription.
If the tear down being added is a subscription that is already
unsubscribed, is the same reference add is being called on, or is
Subscription.EMPTY, it will not be added.
If this subscription is already in an isUnsubscribed state, the passed
tear down logic will be executed immediately.
The additional logic to execute on teardown.
Returns the Subscription used or created to be
added to the inner subscriptions list. This Subscription can be used with
remove() to remove the passed teardown logic from the inner subscriptions
list.
The Observer callback to receive a valueless notification of type
complete from the Observable. Notifies the Observer that the Observable
has finished sending push-based notifications.
The Observer callback to receive notifications of type next from
the Observable, with a value. The Observable may call this method 0 or more
times.
Removes a Subscription from the internal list of subscriptions that will unsubscribe during the unsubscribe process of this Subscription.
The subscription to remove.
A static factory for a Subscriber, given a (potentially partial) definition of an Observer.
A Subscriber wrapping the (partially defined) Observer represented by the given arguments.
Applies a given project function to each value emitted by the source
Observable, and emits the resulting values as an Observable.
Like Array.prototype.map(), it passes each source value through a transformation function to get corresponding output values.

Similar to the well known Array.prototype.map function, this operator
applies a projection to each value and emits that projection in the output
Observable.
The function to apply
to each value emitted by the source Observable. The index parameter is
the number i for the i-th emission that has happened since the
subscription, starting from the number 0.
An Observable that emits the values from the source
Observable transformed by the given project function.
We need this JSDoc comment for affecting ESDoc.
A flag to indicate whether this Subscription has already been unsubscribed.
Adds a tear down to be called during the unsubscribe() of this Subscription.
If the tear down being added is a subscription that is already
unsubscribed, is the same reference add is being called on, or is
Subscription.EMPTY, it will not be added.
If this subscription is already in an isUnsubscribed state, the passed
tear down logic will be executed immediately.
The additional logic to execute on teardown.
Returns the Subscription used or created to be
added to the inner subscriptions list. This Subscription can be used with
remove() to remove the passed teardown logic from the inner subscriptions
list.
The Observer callback to receive a valueless notification of type
complete from the Observable. Notifies the Observer that the Observable
has finished sending push-based notifications.
The Observer callback to receive notifications of type next from
the Observable, with a value. The Observable may call this method 0 or more
times.
Removes a Subscription from the internal list of subscriptions that will unsubscribe during the unsubscribe process of this Subscription.
The subscription to remove.
A static factory for a Subscriber, given a (potentially partial) definition of an Observer.
A Subscriber wrapping the (partially defined) Observer represented by the given arguments.
Emits the given constant value on the output Observable every time the source Observable emits a value.
Like map, but it maps every source value to the same output value every time.

Takes a constant value as argument, and emits that whenever the source
Observable emits a value. In other words, ignores the actual source value,
and simply uses the emission moment to know when to emit the given value.
The value to map each source value to.
An Observable that emits the given value every time
the source Observable emits something.
We need this JSDoc comment for affecting ESDoc.
A flag to indicate whether this Subscription has already been unsubscribed.
Adds a tear down to be called during the unsubscribe() of this Subscription.
If the tear down being added is a subscription that is already
unsubscribed, is the same reference add is being called on, or is
Subscription.EMPTY, it will not be added.
If this subscription is already in an isUnsubscribed state, the passed
tear down logic will be executed immediately.
The additional logic to execute on teardown.
Returns the Subscription used or created to be
added to the inner subscriptions list. This Subscription can be used with
remove() to remove the passed teardown logic from the inner subscriptions
list.
The Observer callback to receive a valueless notification of type
complete from the Observable. Notifies the Observer that the Observable
has finished sending push-based notifications.
The Observer callback to receive notifications of type next from
the Observable, with a value. The Observable may call this method 0 or more
times.
Removes a Subscription from the internal list of subscriptions that will unsubscribe during the unsubscribe process of this Subscription.
The subscription to remove.
A static factory for a Subscriber, given a (potentially partial) definition of an Observer.
A Subscriber wrapping the (partially defined) Observer represented by the given arguments.
Represents all of the notifications from the source Observable as next
emissions marked with their original types within Notification
objects.
Wraps next, error and complete emissions in
Notification objects, emitted as next on the output Observable.

materialize returns an Observable that emits a next notification for each
next, error, or complete emission of the source Observable. When the
source Observable emits complete, the output Observable will emit next as
a Notification of type "complete", and then it will emit complete as well.
When the source Observable emits error, the output will emit next as a
Notification of type "error", and then complete.
This operator is useful for producing metadata of the source Observable, to
be consumed as next emissions. Use it in conjunction with
dematerialize.
An Observable that emits Notification objects that wrap the original emissions from the source Observable with metadata.
The Max operator operates on an Observable that emits numbers (or items that can be evaluated as numbers), and when source Observable completes it emits a single item: the item with the largest number.

an Observable that emits item with the largest number.
Creates an output Observable which concurrently emits all values from every given input Observable.
Flattens multiple Observables together by blending their values into one Observable.

merge subscribes to each given input Observable (either the source or an
Observable given as argument), and simply forwards (without doing any
transformation) all the values from all the input Observables to the output
Observable. The output Observable only completes once all input Observables
have completed. Any error delivered by an input Observable will be immediately
emitted on the output Observable.
an Observable that emits items that are the result of every input Observable.
Creates an output Observable which concurrently emits all values from every given input Observable.
Flattens multiple Observables together by blending their values into one Observable.

merge subscribes to each given input Observable (as arguments), and simply
forwards (without doing any transformation) all the values from all the input
Observables to the output Observable. The output Observable only completes
once all input Observables have completed. Any error delivered by an input
Observable will be immediately emitted on the output Observable.
an Observable that emits items that are the result of every input Observable.
Creates an output Observable which concurrently emits all values from every given input Observable.
Flattens multiple Observables together by blending their values into one Observable.

merge subscribes to each given input Observable (as arguments), and simply
forwards (without doing any transformation) all the values from all the input
Observables to the output Observable. The output Observable only completes
once all input Observables have completed. Any error delivered by an input
Observable will be immediately emitted on the output Observable.
an Observable that emits items that are the result of every input Observable.
Creates an output Observable which concurrently emits all values from every given input Observable.
Flattens multiple Observables together by blending their values into one Observable.

merge subscribes to each given input Observable (as arguments), and simply
forwards (without doing any transformation) all the values from all the input
Observables to the output Observable. The output Observable only completes
once all input Observables have completed. Any error delivered by an input
Observable will be immediately emitted on the output Observable.
an Observable that emits items that are the result of every input Observable.
Creates an output Observable which concurrently emits all values from every given input Observable.
Flattens multiple Observables together by blending their values into one Observable.

merge subscribes to each given input Observable (as arguments), and simply
forwards (without doing any transformation) all the values from all the input
Observables to the output Observable. The output Observable only completes
once all input Observables have completed. Any error delivered by an input
Observable will be immediately emitted on the output Observable.
an Observable that emits items that are the result of every input Observable.
Creates an output Observable which concurrently emits all values from every given input Observable.
Flattens multiple Observables together by blending their values into one Observable.

merge subscribes to each given input Observable (as arguments), and simply
forwards (without doing any transformation) all the values from all the input
Observables to the output Observable. The output Observable only completes
once all input Observables have completed. Any error delivered by an input
Observable will be immediately emitted on the output Observable.
an Observable that emits items that are the result of every input Observable.
Creates an output Observable which concurrently emits all values from every given input Observable.
Flattens multiple Observables together by blending their values into one Observable.

merge subscribes to each given input Observable (as arguments), and simply
forwards (without doing any transformation) all the values from all the input
Observables to the output Observable. The output Observable only completes
once all input Observables have completed. Any error delivered by an input
Observable will be immediately emitted on the output Observable.
an Observable that emits items that are the result of every input Observable.
Creates an output Observable which concurrently emits all values from every given input Observable.
Flattens multiple Observables together by blending their values into one Observable.

merge subscribes to each given input Observable (as arguments), and simply
forwards (without doing any transformation) all the values from all the input
Observables to the output Observable. The output Observable only completes
once all input Observables have completed. Any error delivered by an input
Observable will be immediately emitted on the output Observable.
an Observable that emits items that are the result of every input Observable.
Creates an output Observable which concurrently emits all values from every given input Observable.
Flattens multiple Observables together by blending their values into one Observable.

merge subscribes to each given input Observable (as arguments), and simply
forwards (without doing any transformation) all the values from all the input
Observables to the output Observable. The output Observable only completes
once all input Observables have completed. Any error delivered by an input
Observable will be immediately emitted on the output Observable.
an Observable that emits items that are the result of every input Observable.
Creates an output Observable which concurrently emits all values from every given input Observable.
Flattens multiple Observables together by blending their values into one Observable.

merge subscribes to each given input Observable (as arguments), and simply
forwards (without doing any transformation) all the values from all the input
Observables to the output Observable. The output Observable only completes
once all input Observables have completed. Any error delivered by an input
Observable will be immediately emitted on the output Observable.
an Observable that emits items that are the result of every input Observable.
Creates an output Observable which concurrently emits all values from every given input Observable.
Flattens multiple Observables together by blending their values into one Observable.

merge subscribes to each given input Observable (as arguments), and simply
forwards (without doing any transformation) all the values from all the input
Observables to the output Observable. The output Observable only completes
once all input Observables have completed. Any error delivered by an input
Observable will be immediately emitted on the output Observable.
an Observable that emits items that are the result of every input Observable.
Creates an output Observable which concurrently emits all values from every given input Observable.
Flattens multiple Observables together by blending their values into one Observable.

merge subscribes to each given input Observable (as arguments), and simply
forwards (without doing any transformation) all the values from all the input
Observables to the output Observable. The output Observable only completes
once all input Observables have completed. Any error delivered by an input
Observable will be immediately emitted on the output Observable.
an Observable that emits items that are the result of every input Observable.
Creates an output Observable which concurrently emits all values from every given input Observable.
Flattens multiple Observables together by blending their values into one Observable.

merge subscribes to each given input Observable (as arguments), and simply
forwards (without doing any transformation) all the values from all the input
Observables to the output Observable. The output Observable only completes
once all input Observables have completed. Any error delivered by an input
Observable will be immediately emitted on the output Observable.
an Observable that emits items that are the result of every input Observable.
Creates an output Observable which concurrently emits all values from every given input Observable.
Flattens multiple Observables together by blending their values into one Observable.

merge subscribes to each given input Observable (as arguments), and simply
forwards (without doing any transformation) all the values from all the input
Observables to the output Observable. The output Observable only completes
once all input Observables have completed. Any error delivered by an input
Observable will be immediately emitted on the output Observable.
an Observable that emits items that are the result of every input Observable.
Creates an output Observable which concurrently emits all values from every given input Observable.
Flattens multiple Observables together by blending their values into one Observable.

merge subscribes to each given input Observable (as arguments), and simply
forwards (without doing any transformation) all the values from all the input
Observables to the output Observable. The output Observable only completes
once all input Observables have completed. Any error delivered by an input
Observable will be immediately emitted on the output Observable.
an Observable that emits items that are the result of every input Observable.
We need this JSDoc comment for affecting ESDoc.
A flag to indicate whether this Subscription has already been unsubscribed.
Adds a tear down to be called during the unsubscribe() of this Subscription.
If the tear down being added is a subscription that is already
unsubscribed, is the same reference add is being called on, or is
Subscription.EMPTY, it will not be added.
If this subscription is already in an isUnsubscribed state, the passed
tear down logic will be executed immediately.
The additional logic to execute on teardown.
Returns the Subscription used or created to be
added to the inner subscriptions list. This Subscription can be used with
remove() to remove the passed teardown logic from the inner subscriptions
list.
The Observer callback to receive a valueless notification of type
complete from the Observable. Notifies the Observer that the Observable
has finished sending push-based notifications.
The Observer callback to receive notifications of type next from
the Observable, with a value. The Observable may call this method 0 or more
times.
Removes a Subscription from the internal list of subscriptions that will unsubscribe during the unsubscribe process of this Subscription.
The subscription to remove.
A static factory for a Subscriber, given a (potentially partial) definition of an Observer.
A Subscriber wrapping the (partially defined) Observer represented by the given arguments.
Converts a higher-order Observable into a first-order Observable which concurrently delivers all values that are emitted on the inner Observables.
Flattens an Observable-of-Observables.

mergeAll subscribes to an Observable that emits Observables, also known as
a higher-order Observable. Each time it observes one of these emitted inner
Observables, it subscribes to that and delivers all the values from the
inner Observable on the output Observable. The output Observable only
completes once all inner Observables have completed. Any error delivered by
a inner Observable will be immediately emitted on the output Observable.
An Observable that emits values coming from all the inner Observables emitted by the source Observable.
We need this JSDoc comment for affecting ESDoc.
A flag to indicate whether this Subscription has already been unsubscribed.
Adds a tear down to be called during the unsubscribe() of this Subscription.
If the tear down being added is a subscription that is already
unsubscribed, is the same reference add is being called on, or is
Subscription.EMPTY, it will not be added.
If this subscription is already in an isUnsubscribed state, the passed
tear down logic will be executed immediately.
The additional logic to execute on teardown.
Returns the Subscription used or created to be
added to the inner subscriptions list. This Subscription can be used with
remove() to remove the passed teardown logic from the inner subscriptions
list.
The Observer callback to receive a valueless notification of type
complete from the Observable. Notifies the Observer that the Observable
has finished sending push-based notifications.
The Observer callback to receive notifications of type next from
the Observable, with a value. The Observable may call this method 0 or more
times.
Removes a Subscription from the internal list of subscriptions that will unsubscribe during the unsubscribe process of this Subscription.
The subscription to remove.
A static factory for a Subscriber, given a (potentially partial) definition of an Observer.
A Subscriber wrapping the (partially defined) Observer represented by the given arguments.
Projects each source value to an Observable which is merged in the output Observable.
Maps each value to an Observable, then flattens all of these inner Observables using mergeAll.

Returns an Observable that emits items based on applying a function that you supply to each item emitted by the source Observable, where that function returns an Observable, and then merging those resulting Observables and emitting the results of this merger.
A function that, when applied to an item emitted by the source Observable, returns an Observable.
An Observable that emits the result of applying the
projection function (and the optional resultSelector) to each item emitted
by the source Observable and merging the results of the Observables obtained
from this transformation.
We need this JSDoc comment for affecting ESDoc.
A flag to indicate whether this Subscription has already been unsubscribed.
Adds a tear down to be called during the unsubscribe() of this Subscription.
If the tear down being added is a subscription that is already
unsubscribed, is the same reference add is being called on, or is
Subscription.EMPTY, it will not be added.
If this subscription is already in an isUnsubscribed state, the passed
tear down logic will be executed immediately.
The additional logic to execute on teardown.
Returns the Subscription used or created to be
added to the inner subscriptions list. This Subscription can be used with
remove() to remove the passed teardown logic from the inner subscriptions
list.
The Observer callback to receive a valueless notification of type
complete from the Observable. Notifies the Observer that the Observable
has finished sending push-based notifications.
The Observer callback to receive notifications of type next from
the Observable, with a value. The Observable may call this method 0 or more
times.
Removes a Subscription from the internal list of subscriptions that will unsubscribe during the unsubscribe process of this Subscription.
The subscription to remove.
A static factory for a Subscriber, given a (potentially partial) definition of an Observer.
A Subscriber wrapping the (partially defined) Observer represented by the given arguments.
Projects each source value to the same Observable which is merged multiple times in the output Observable.
It's like mergeMap, but maps each value always to the same inner Observable.

Maps each source value to the given Observable innerObservable regardless
of the source value, and then merges those resulting Observables into one
single Observable, which is the output Observable.
An Observable to replace each value from the source Observable.
An Observable that emits items from the given
innerObservable (and optionally transformed through resultSelector) every
time a value is emitted on the source Observable.
We need this JSDoc comment for affecting ESDoc.
A flag to indicate whether this Subscription has already been unsubscribed.
Adds a tear down to be called during the unsubscribe() of this Subscription.
If the tear down being added is a subscription that is already
unsubscribed, is the same reference add is being called on, or is
Subscription.EMPTY, it will not be added.
If this subscription is already in an isUnsubscribed state, the passed
tear down logic will be executed immediately.
The additional logic to execute on teardown.
Returns the Subscription used or created to be
added to the inner subscriptions list. This Subscription can be used with
remove() to remove the passed teardown logic from the inner subscriptions
list.
The Observer callback to receive a valueless notification of type
complete from the Observable. Notifies the Observer that the Observable
has finished sending push-based notifications.
The Observer callback to receive notifications of type next from
the Observable, with a value. The Observable may call this method 0 or more
times.
Removes a Subscription from the internal list of subscriptions that will unsubscribe during the unsubscribe process of this Subscription.
The subscription to remove.
A static factory for a Subscriber, given a (potentially partial) definition of an Observer.
A Subscriber wrapping the (partially defined) Observer represented by the given arguments.
The Min operator operates on an Observable that emits numbers (or items that can be evaluated as numbers), and when source Observable completes it emits a single item: the item with the smallest number.

an Observable that emits item with the smallest number.
Returns an Observable that emits the results of invoking a specified selector on items emitted by a ConnectableObservable that shares a single subscription to the underlying stream.

an Observable that emits the results of invoking the selector
on the items emitted by a ConnectableObservable that shares a single subscription to
the underlying stream.
We need this JSDoc comment for affecting ESDoc.
A flag to indicate whether this Subscription has already been unsubscribed.
Adds a tear down to be called during the unsubscribe() of this Subscription.
If the tear down being added is a subscription that is already
unsubscribed, is the same reference add is being called on, or is
Subscription.EMPTY, it will not be added.
If this subscription is already in an isUnsubscribed state, the passed
tear down logic will be executed immediately.
The additional logic to execute on teardown.
Returns the Subscription used or created to be
added to the inner subscriptions list. This Subscription can be used with
remove() to remove the passed teardown logic from the inner subscriptions
list.
The Observer callback to receive a valueless notification of type
complete from the Observable. Notifies the Observer that the Observable
has finished sending push-based notifications.
The Observer callback to receive notifications of type next from
the Observable, with a value. The Observable may call this method 0 or more
times.
Removes a Subscription from the internal list of subscriptions that will unsubscribe during the unsubscribe process of this Subscription.
The subscription to remove.
A static factory for a Subscriber, given a (potentially partial) definition of an Observer.
A Subscriber wrapping the (partially defined) Observer represented by the given arguments.
A flag to indicate whether this Subscription has already been unsubscribed.
Adds a tear down to be called during the unsubscribe() of this Subscription.
If the tear down being added is a subscription that is already
unsubscribed, is the same reference add is being called on, or is
Subscription.EMPTY, it will not be added.
If this subscription is already in an isUnsubscribed state, the passed
tear down logic will be executed immediately.
The additional logic to execute on teardown.
Returns the Subscription used or created to be
added to the inner subscriptions list. This Subscription can be used with
remove() to remove the passed teardown logic from the inner subscriptions
list.
The Observer callback to receive a valueless notification of type
complete from the Observable. Notifies the Observer that the Observable
has finished sending push-based notifications.
The Observer callback to receive notifications of type next from
the Observable, with a value. The Observable may call this method 0 or more
times.
Removes a Subscription from the internal list of subscriptions that will unsubscribe during the unsubscribe process of this Subscription.
The subscription to remove.
A static factory for a Subscriber, given a (potentially partial) definition of an Observer.
A Subscriber wrapping the (partially defined) Observer represented by the given arguments.
We need this JSDoc comment for affecting ESDoc.
A flag to indicate whether this Subscription has already been unsubscribed.
Adds a tear down to be called during the unsubscribe() of this Subscription.
If the tear down being added is a subscription that is already
unsubscribed, is the same reference add is being called on, or is
Subscription.EMPTY, it will not be added.
If this subscription is already in an isUnsubscribed state, the passed
tear down logic will be executed immediately.
The additional logic to execute on teardown.
Returns the Subscription used or created to be
added to the inner subscriptions list. This Subscription can be used with
remove() to remove the passed teardown logic from the inner subscriptions
list.
The Observer callback to receive a valueless notification of type
complete from the Observable. Notifies the Observer that the Observable
has finished sending push-based notifications.
The Observer callback to receive notifications of type next from
the Observable, with a value. The Observable may call this method 0 or more
times.
Removes a Subscription from the internal list of subscriptions that will unsubscribe during the unsubscribe process of this Subscription.
The subscription to remove.
A static factory for a Subscriber, given a (potentially partial) definition of an Observer.
A Subscriber wrapping the (partially defined) Observer represented by the given arguments.
Groups pairs of consecutive emissions together and emits them as an array of two values.
Puts the current value and previous value together as an array, and emits that.

The Nth emission from the source Observable will cause the output Observable
to emit an array [(N-1)th, Nth] of the previous and the current value, as a
pair. For this reason, pairwise emits on the second and subsequent
emissions from the source Observable, but not on the first emission, because
there is no previous value in that case.
An Observable of pairs of consecutive values from the source Observable.
Splits the source Observable into two, one with values that satisfy a predicate, and another with values that don't satisfy the predicate.
It's like filter, but returns two Observables: one like the output of filter, and the other with values that did not pass the condition.

partition outputs an array with two Observables that partition the values
from the source Observable through the given predicate function. The first
Observable in that array emits source values for which the predicate argument
returns true. The second Observable emits source values for which the
predicate returns false. The first behaves like filter and the second
behaves like filter with the predicate negated.
A function that
evaluates each value emitted by the source Observable. If it returns true,
the value is emitted on the first Observable in the returned array, if
false the value is emitted on the second Observable in the array. The
index parameter is the number i for the i-th source emission that has
happened since the subscription, starting from the number 0.
An array with two Observables: one with values that passed the predicate, and another with values that did not pass the predicate.
Maps each source value (an object) to its specified nested property.
Like map, but meant only for picking one of the nested properties of every emitted object.

Given a list of strings describing a path to an object property, retrieves
the value of a specified nested property from all values in the source
Observable. If a property can't be resolved, it will return undefined for
that value.
The nested properties to pluck from each source value (an object).
Returns a new Observable of property values from the source values.
Returns a ConnectableObservable, which is a variety of Observable that waits until its connect method is called before it begins emitting items to those Observers that have subscribed to it.

a ConnectableObservable that upon connection causes the source Observable to emit items to its Observers.
We need this JSDoc comment for affecting ESDoc.
A flag to indicate whether this Subscription has already been unsubscribed.
Adds a tear down to be called during the unsubscribe() of this Subscription.
If the tear down being added is a subscription that is already
unsubscribed, is the same reference add is being called on, or is
Subscription.EMPTY, it will not be added.
If this subscription is already in an isUnsubscribed state, the passed
tear down logic will be executed immediately.
The additional logic to execute on teardown.
Returns the Subscription used or created to be
added to the inner subscriptions list. This Subscription can be used with
remove() to remove the passed teardown logic from the inner subscriptions
list.
The Observer callback to receive a valueless notification of type
complete from the Observable. Notifies the Observer that the Observable
has finished sending push-based notifications.
The Observer callback to receive notifications of type next from
the Observable, with a value. The Observable may call this method 0 or more
times.
Removes a Subscription from the internal list of subscriptions that will unsubscribe during the unsubscribe process of this Subscription.
The subscription to remove.
A static factory for a Subscriber, given a (potentially partial) definition of an Observer.
A Subscriber wrapping the (partially defined) Observer represented by the given arguments.
Returns an Observable that mirrors the first source Observable to emit an item from the combination of this Observable and supplied Observables
an Observable that mirrors the output of the first Observable to emit an item.
Returns an Observable that mirrors the first source Observable to emit an item.
an Observable that mirrors the output of the first Observable to emit an item.
We need this JSDoc comment for affecting ESDoc.
A flag to indicate whether this Subscription has already been unsubscribed.
Adds a tear down to be called during the unsubscribe() of this Subscription.
If the tear down being added is a subscription that is already
unsubscribed, is the same reference add is being called on, or is
Subscription.EMPTY, it will not be added.
If this subscription is already in an isUnsubscribed state, the passed
tear down logic will be executed immediately.
The additional logic to execute on teardown.
Returns the Subscription used or created to be
added to the inner subscriptions list. This Subscription can be used with
remove() to remove the passed teardown logic from the inner subscriptions
list.
The Observer callback to receive a valueless notification of type
complete from the Observable. Notifies the Observer that the Observable
has finished sending push-based notifications.
The Observer callback to receive notifications of type next from
the Observable, with a value. The Observable may call this method 0 or more
times.
Removes a Subscription from the internal list of subscriptions that will unsubscribe during the unsubscribe process of this Subscription.
The subscription to remove.
A static factory for a Subscriber, given a (potentially partial) definition of an Observer.
A Subscriber wrapping the (partially defined) Observer represented by the given arguments.
Applies an accumulator function over the source Observable, and returns the accumulated result when the source completes, given an optional seed value.
Combines together all values emitted on the source, using an accumulator function that knows how to join a new source value into the accumulation from the past.

Like
Array.prototype.reduce(),
reduce applies an accumulator function against an accumulation and each
value of the source Observable (from the past) to reduce it to a single
value, emitted on the output Observable. Note that reduce will only emit
one value, only when the source Observable completes. It is equivalent to
applying operator scan followed by operator last.
Returns an Observable that applies a specified accumulator function to each
item emitted by the source Observable. If a seed value is specified, then
that value will be used as the initial value for the accumulator. If no seed
value is specified, the first item of the source is used as the seed.
The accumulator function called on each source value.
An observable of the accumulated values.
We need this JSDoc comment for affecting ESDoc.
A flag to indicate whether this Subscription has already been unsubscribed.
Adds a tear down to be called during the unsubscribe() of this Subscription.
If the tear down being added is a subscription that is already
unsubscribed, is the same reference add is being called on, or is
Subscription.EMPTY, it will not be added.
If this subscription is already in an isUnsubscribed state, the passed
tear down logic will be executed immediately.
The additional logic to execute on teardown.
Returns the Subscription used or created to be
added to the inner subscriptions list. This Subscription can be used with
remove() to remove the passed teardown logic from the inner subscriptions
list.
The Observer callback to receive notifications of type next from
the Observable, with a value. The Observable may call this method 0 or more
times.
Removes a Subscription from the internal list of subscriptions that will unsubscribe during the unsubscribe process of this Subscription.
The subscription to remove.
A static factory for a Subscriber, given a (potentially partial) definition of an Observer.
A Subscriber wrapping the (partially defined) Observer represented by the given arguments.
Returns an Observable that repeats the stream of items emitted by the source Observable at most count times, on a particular Scheduler.

an Observable that repeats the stream of items emitted by the source Observable at most count times.
We need this JSDoc comment for affecting ESDoc.
A flag to indicate whether this Subscription has already been unsubscribed.
Adds a tear down to be called during the unsubscribe() of this Subscription.
If the tear down being added is a subscription that is already
unsubscribed, is the same reference add is being called on, or is
Subscription.EMPTY, it will not be added.
If this subscription is already in an isUnsubscribed state, the passed
tear down logic will be executed immediately.
The additional logic to execute on teardown.
Returns the Subscription used or created to be
added to the inner subscriptions list. This Subscription can be used with
remove() to remove the passed teardown logic from the inner subscriptions
list.
The Observer callback to receive a valueless notification of type
complete from the Observable. Notifies the Observer that the Observable
has finished sending push-based notifications.
The Observer callback to receive notifications of type next from
the Observable, with a value. The Observable may call this method 0 or more
times.
Removes a Subscription from the internal list of subscriptions that will unsubscribe during the unsubscribe process of this Subscription.
The subscription to remove.
A static factory for a Subscriber, given a (potentially partial) definition of an Observer.
A Subscriber wrapping the (partially defined) Observer represented by the given arguments.
Returns an Observable that mirrors the source Observable, resubscribing to it if it calls error and the
predicate returns true for that specific exception and retry count.
If the source Observable calls error, this method will resubscribe to the source Observable for a maximum of
count resubscriptions (given as a number parameter) rather than propagating the error call.

Any and all items emitted by the source Observable will be emitted by the resulting Observable, even those emitted
during failed subscriptions. For example, if an Observable fails at first but emits [1, 2] then succeeds the second
time and emits: [1, 2, 3, 4, 5] then the complete stream of emissions and notifications
would be: [1, 2, 1, 2, 3, 4, 5, complete].
the source Observable modified with the retry logic.
We need this JSDoc comment for affecting ESDoc.
A flag to indicate whether this Subscription has already been unsubscribed.
Adds a tear down to be called during the unsubscribe() of this Subscription.
If the tear down being added is a subscription that is already
unsubscribed, is the same reference add is being called on, or is
Subscription.EMPTY, it will not be added.
If this subscription is already in an isUnsubscribed state, the passed
tear down logic will be executed immediately.
The additional logic to execute on teardown.
Returns the Subscription used or created to be
added to the inner subscriptions list. This Subscription can be used with
remove() to remove the passed teardown logic from the inner subscriptions
list.
The Observer callback to receive a valueless notification of type
complete from the Observable. Notifies the Observer that the Observable
has finished sending push-based notifications.
The Observer callback to receive notifications of type next from
the Observable, with a value. The Observable may call this method 0 or more
times.
Removes a Subscription from the internal list of subscriptions that will unsubscribe during the unsubscribe process of this Subscription.
The subscription to remove.
A static factory for a Subscriber, given a (potentially partial) definition of an Observer.
A Subscriber wrapping the (partially defined) Observer represented by the given arguments.
Returns an Observable that emits the same values as the source observable with the exception of an error.
An error will cause the emission of the Throwable that cause the error to the Observable returned from
notificationHandler. If that Observable calls onComplete or error then retry will call complete or error
on the child subscription. Otherwise, this Observable will resubscribe to the source observable, on a particular
Scheduler.

the source Observable modified with retry logic.
We need this JSDoc comment for affecting ESDoc.
A flag to indicate whether this Subscription has already been unsubscribed.
Adds a tear down to be called during the unsubscribe() of this Subscription.
If the tear down being added is a subscription that is already
unsubscribed, is the same reference add is being called on, or is
Subscription.EMPTY, it will not be added.
If this subscription is already in an isUnsubscribed state, the passed
tear down logic will be executed immediately.
The additional logic to execute on teardown.
Returns the Subscription used or created to be
added to the inner subscriptions list. This Subscription can be used with
remove() to remove the passed teardown logic from the inner subscriptions
list.
The Observer callback to receive a valueless notification of type
complete from the Observable. Notifies the Observer that the Observable
has finished sending push-based notifications.
The Observer callback to receive notifications of type next from
the Observable, with a value. The Observable may call this method 0 or more
times.
Removes a Subscription from the internal list of subscriptions that will unsubscribe during the unsubscribe process of this Subscription.
The subscription to remove.
A static factory for a Subscriber, given a (potentially partial) definition of an Observer.
A Subscriber wrapping the (partially defined) Observer represented by the given arguments.
Emits the most recently emitted value from the source Observable whenever
another Observable, the notifier, emits.
It's like sampleTime, but samples whenever
the notifier Observable emits something.

Whenever the notifier Observable emits a value or completes, sample
looks at the source Observable and emits whichever value it has most recently
emitted since the previous sampling, unless the source has not emitted
anything since the previous sampling. The notifier is subscribed to as soon
as the output Observable is subscribed.
The Observable to use for sampling the source Observable.
An Observable that emits the results of sampling the values emitted by the source Observable whenever the notifier Observable emits value or completes.
We need this JSDoc comment for affecting ESDoc.
A flag to indicate whether this Subscription has already been unsubscribed.
Adds a tear down to be called during the unsubscribe() of this Subscription.
If the tear down being added is a subscription that is already
unsubscribed, is the same reference add is being called on, or is
Subscription.EMPTY, it will not be added.
If this subscription is already in an isUnsubscribed state, the passed
tear down logic will be executed immediately.
The additional logic to execute on teardown.
Returns the Subscription used or created to be
added to the inner subscriptions list. This Subscription can be used with
remove() to remove the passed teardown logic from the inner subscriptions
list.
The Observer callback to receive a valueless notification of type
complete from the Observable. Notifies the Observer that the Observable
has finished sending push-based notifications.
The Observer callback to receive notifications of type next from
the Observable, with a value. The Observable may call this method 0 or more
times.
Removes a Subscription from the internal list of subscriptions that will unsubscribe during the unsubscribe process of this Subscription.
The subscription to remove.
A static factory for a Subscriber, given a (potentially partial) definition of an Observer.
A Subscriber wrapping the (partially defined) Observer represented by the given arguments.
Emits the most recently emitted value from the source Observable within periodic time intervals.
Samples the source Observable at periodic time intervals, emitting what it samples.

sampleTime periodically looks at the source Observable and emits whichever
value it has most recently emitted since the previous sampling, unless the
source has not emitted anything since the previous sampling. The sampling
happens periodically in time every period milliseconds (or the time unit
defined by the optional scheduler argument). The sampling starts as soon as
the output Observable is subscribed.
The sampling period expressed in milliseconds or the
time unit determined internally by the optional scheduler.
An Observable that emits the results of sampling the values emitted by the source Observable at the specified time interval.
We need this JSDoc comment for affecting ESDoc.
A flag to indicate whether this Subscription has already been unsubscribed.
Adds a tear down to be called during the unsubscribe() of this Subscription.
If the tear down being added is a subscription that is already
unsubscribed, is the same reference add is being called on, or is
Subscription.EMPTY, it will not be added.
If this subscription is already in an isUnsubscribed state, the passed
tear down logic will be executed immediately.
The additional logic to execute on teardown.
Returns the Subscription used or created to be
added to the inner subscriptions list. This Subscription can be used with
remove() to remove the passed teardown logic from the inner subscriptions
list.
The Observer callback to receive a valueless notification of type
complete from the Observable. Notifies the Observer that the Observable
has finished sending push-based notifications.
The Observer callback to receive notifications of type next from
the Observable, with a value. The Observable may call this method 0 or more
times.
Removes a Subscription from the internal list of subscriptions that will unsubscribe during the unsubscribe process of this Subscription.
The subscription to remove.
A static factory for a Subscriber, given a (potentially partial) definition of an Observer.
A Subscriber wrapping the (partially defined) Observer represented by the given arguments.
Applies an accumulator function over the source Observable, and returns each intermediate result, with an optional seed value.
It's like reduce, but emits the current accumulation whenever the source emits a value.

Combines together all values emitted on the source, using an accumulator function that knows how to join a new source value into the accumulation from the past. Is similar to reduce, but emits the intermediate accumulations.
Returns an Observable that applies a specified accumulator function to each
item emitted by the source Observable. If a seed value is specified, then
that value will be used as the initial value for the accumulator. If no seed
value is specified, the first item of the source is used as the seed.
The accumulator function called on each source value.
An observable of the accumulated values.
Returns a new Observable that multicasts (shares) the original Observable. As long as there is at least one
Subscriber this Observable will be subscribed and emitting data. When all subscribers have unsubscribed it will
unsubscribe from the source Observable. Because the Observable is multicasting it makes the stream hot.
This is an alias for .publish().refCount().

an Observable that upon connection causes the source Observable to emit items to its Observers
We need this JSDoc comment for affecting ESDoc.
A flag to indicate whether this Subscription has already been unsubscribed.
Adds a tear down to be called during the unsubscribe() of this Subscription.
If the tear down being added is a subscription that is already
unsubscribed, is the same reference add is being called on, or is
Subscription.EMPTY, it will not be added.
If this subscription is already in an isUnsubscribed state, the passed
tear down logic will be executed immediately.
The additional logic to execute on teardown.
Returns the Subscription used or created to be
added to the inner subscriptions list. This Subscription can be used with
remove() to remove the passed teardown logic from the inner subscriptions
list.
The Observer callback to receive a valueless notification of type
complete from the Observable. Notifies the Observer that the Observable
has finished sending push-based notifications.
The Observer callback to receive notifications of type next from
the Observable, with a value. The Observable may call this method 0 or more
times.
Removes a Subscription from the internal list of subscriptions that will unsubscribe during the unsubscribe process of this Subscription.
The subscription to remove.
A static factory for a Subscriber, given a (potentially partial) definition of an Observer.
A Subscriber wrapping the (partially defined) Observer represented by the given arguments.
Returns an Observable that emits the single item emitted by the source Observable that matches a specified predicate, if that Observable emits one such item. If the source Observable emits more than one such item or no such items, notify of an IllegalArgumentException or NoSuchElementException respectively.

an Observable that emits the single item emitted by the source Observable that matches the predicate. .
We need this JSDoc comment for affecting ESDoc.
A flag to indicate whether this Subscription has already been unsubscribed.
Adds a tear down to be called during the unsubscribe() of this Subscription.
If the tear down being added is a subscription that is already
unsubscribed, is the same reference add is being called on, or is
Subscription.EMPTY, it will not be added.
If this subscription is already in an isUnsubscribed state, the passed
tear down logic will be executed immediately.
The additional logic to execute on teardown.
Returns the Subscription used or created to be
added to the inner subscriptions list. This Subscription can be used with
remove() to remove the passed teardown logic from the inner subscriptions
list.
The Observer callback to receive a valueless notification of type
complete from the Observable. Notifies the Observer that the Observable
has finished sending push-based notifications.
The Observer callback to receive notifications of type next from
the Observable, with a value. The Observable may call this method 0 or more
times.
Removes a Subscription from the internal list of subscriptions that will unsubscribe during the unsubscribe process of this Subscription.
The subscription to remove.
A static factory for a Subscriber, given a (potentially partial) definition of an Observer.
A Subscriber wrapping the (partially defined) Observer represented by the given arguments.
Returns an Observable that skips n items emitted by an Observable.

an Observable that skips values emitted by the source Observable.
We need this JSDoc comment for affecting ESDoc.
A flag to indicate whether this Subscription has already been unsubscribed.
Adds a tear down to be called during the unsubscribe() of this Subscription.
If the tear down being added is a subscription that is already
unsubscribed, is the same reference add is being called on, or is
Subscription.EMPTY, it will not be added.
If this subscription is already in an isUnsubscribed state, the passed
tear down logic will be executed immediately.
The additional logic to execute on teardown.
Returns the Subscription used or created to be
added to the inner subscriptions list. This Subscription can be used with
remove() to remove the passed teardown logic from the inner subscriptions
list.
The Observer callback to receive a valueless notification of type
complete from the Observable. Notifies the Observer that the Observable
has finished sending push-based notifications.
The Observer callback to receive notifications of type next from
the Observable, with a value. The Observable may call this method 0 or more
times.
Removes a Subscription from the internal list of subscriptions that will unsubscribe during the unsubscribe process of this Subscription.
The subscription to remove.
A static factory for a Subscriber, given a (potentially partial) definition of an Observer.
A Subscriber wrapping the (partially defined) Observer represented by the given arguments.
Returns an Observable that skips items emitted by the source Observable until a second Observable emits an item.

an Observable that skips items from the source Observable until the second Observable emits an item, then emits the remaining items.
We need this JSDoc comment for affecting ESDoc.
A flag to indicate whether this Subscription has already been unsubscribed.
Adds a tear down to be called during the unsubscribe() of this Subscription.
If the tear down being added is a subscription that is already
unsubscribed, is the same reference add is being called on, or is
Subscription.EMPTY, it will not be added.
If this subscription is already in an isUnsubscribed state, the passed
tear down logic will be executed immediately.
The additional logic to execute on teardown.
Returns the Subscription used or created to be
added to the inner subscriptions list. This Subscription can be used with
remove() to remove the passed teardown logic from the inner subscriptions
list.
The Observer callback to receive a valueless notification of type
complete from the Observable. Notifies the Observer that the Observable
has finished sending push-based notifications.
The Observer callback to receive notifications of type next from
the Observable, with a value. The Observable may call this method 0 or more
times.
Removes a Subscription from the internal list of subscriptions that will unsubscribe during the unsubscribe process of this Subscription.
The subscription to remove.
A static factory for a Subscriber, given a (potentially partial) definition of an Observer.
A Subscriber wrapping the (partially defined) Observer represented by the given arguments.
Returns an Observable that skips all items emitted by the source Observable as long as a specified condition holds true, but emits all further source items as soon as the condition becomes false.

a function to test each item emitted from the source Observable.
an Observable that begins emitting items emitted by the source Observable when the specified predicate becomes false.
Returns an Observable that emits the items in a specified Iterable before it begins to emit items emitted by the source Observable.

an Observable that emits the items in the specified Iterable and then emits the items emitted by the source Observable.
Asynchronously subscribes Observers to this Observable on the specified Scheduler.

the source Observable modified so that its subscriptions happen on the specified Scheduler .
We need this JSDoc comment for affecting ESDoc.
A flag to indicate whether this Subscription has already been unsubscribed.
Adds a tear down to be called during the unsubscribe() of this Subscription.
If the tear down being added is a subscription that is already
unsubscribed, is the same reference add is being called on, or is
Subscription.EMPTY, it will not be added.
If this subscription is already in an isUnsubscribed state, the passed
tear down logic will be executed immediately.
The additional logic to execute on teardown.
Returns the Subscription used or created to be
added to the inner subscriptions list. This Subscription can be used with
remove() to remove the passed teardown logic from the inner subscriptions
list.
The Observer callback to receive a valueless notification of type
complete from the Observable. Notifies the Observer that the Observable
has finished sending push-based notifications.
The Observer callback to receive notifications of type next from
the Observable, with a value. The Observable may call this method 0 or more
times.
Removes a Subscription from the internal list of subscriptions that will unsubscribe during the unsubscribe process of this Subscription.
The subscription to remove.
A static factory for a Subscriber, given a (potentially partial) definition of an Observer.
A Subscriber wrapping the (partially defined) Observer represented by the given arguments.
Converts a higher-order Observable into a first-order Observable by subscribing to only the most recently emitted of those inner Observables.
Flattens an Observable-of-Observables by dropping the previous inner Observable once a new one appears.

switch subscribes to an Observable that emits Observables, also known as a
higher-order Observable. Each time it observes one of these emitted inner
Observables, the output Observable subscribes to the inner Observable and
begins emitting the items emitted by that. So far, it behaves
like mergeAll. However, when a new inner Observable is emitted,
switch unsubscribes from the earlier-emitted inner Observable and
subscribes to the new inner Observable and begins emitting items from it. It
continues to behave like this for subsequent inner Observables.
An Observable that emits the items emitted by the Observable most recently emitted by the source Observable.
We need this JSDoc comment for affecting ESDoc.
A flag to indicate whether this Subscription has already been unsubscribed.
Adds a tear down to be called during the unsubscribe() of this Subscription.
If the tear down being added is a subscription that is already
unsubscribed, is the same reference add is being called on, or is
Subscription.EMPTY, it will not be added.
If this subscription is already in an isUnsubscribed state, the passed
tear down logic will be executed immediately.
The additional logic to execute on teardown.
Returns the Subscription used or created to be
added to the inner subscriptions list. This Subscription can be used with
remove() to remove the passed teardown logic from the inner subscriptions
list.
The Observer callback to receive a valueless notification of type
complete from the Observable. Notifies the Observer that the Observable
has finished sending push-based notifications.
The Observer callback to receive notifications of type next from
the Observable, with a value. The Observable may call this method 0 or more
times.
Removes a Subscription from the internal list of subscriptions that will unsubscribe during the unsubscribe process of this Subscription.
The subscription to remove.
A static factory for a Subscriber, given a (potentially partial) definition of an Observer.
A Subscriber wrapping the (partially defined) Observer represented by the given arguments.
Projects each source value to an Observable which is merged in the output Observable, emitting values only from the most recently projected Observable.
Maps each value to an Observable, then flattens all of these inner Observables using switch.

Returns an Observable that emits items based on applying a function that you
supply to each item emitted by the source Observable, where that function
returns an (so-called "inner") Observable. Each time it observes one of these
inner Observables, the output Observable begins emitting the items emitted by
that inner Observable. When a new inner Observable is emitted, switchMap
stops emitting items from the earlier-emitted inner Observable and begins
emitting items from the new one. It continues to behave like this for
subsequent inner Observables.
A function that, when applied to an item emitted by the source Observable, returns an Observable.
An Observable that emits the result of applying the
projection function (and the optional resultSelector) to each item emitted
by the source Observable and taking only the values from the most recently
projected inner Observable.
We need this JSDoc comment for affecting ESDoc.
A flag to indicate whether this Subscription has already been unsubscribed.
Adds a tear down to be called during the unsubscribe() of this Subscription.
If the tear down being added is a subscription that is already
unsubscribed, is the same reference add is being called on, or is
Subscription.EMPTY, it will not be added.
If this subscription is already in an isUnsubscribed state, the passed
tear down logic will be executed immediately.
The additional logic to execute on teardown.
Returns the Subscription used or created to be
added to the inner subscriptions list. This Subscription can be used with
remove() to remove the passed teardown logic from the inner subscriptions
list.
The Observer callback to receive a valueless notification of type
complete from the Observable. Notifies the Observer that the Observable
has finished sending push-based notifications.
The Observer callback to receive notifications of type next from
the Observable, with a value. The Observable may call this method 0 or more
times.
Removes a Subscription from the internal list of subscriptions that will unsubscribe during the unsubscribe process of this Subscription.
The subscription to remove.
A static factory for a Subscriber, given a (potentially partial) definition of an Observer.
A Subscriber wrapping the (partially defined) Observer represented by the given arguments.
Projects each source value to the same Observable which is flattened multiple times with switch in the output Observable.
It's like switchMap, but maps each value always to the same inner Observable.

Maps each source value to the given Observable innerObservable regardless
of the source value, and then flattens those resulting Observables into one
single Observable, which is the output Observable. The output Observables
emits values only from the most recently emitted instance of
innerObservable.
An Observable to replace each value from the source Observable.
An Observable that emits items from the given
innerObservable every time a value is emitted on the source Observable.
We need this JSDoc comment for affecting ESDoc.
A flag to indicate whether this Subscription has already been unsubscribed.
Adds a tear down to be called during the unsubscribe() of this Subscription.
If the tear down being added is a subscription that is already
unsubscribed, is the same reference add is being called on, or is
Subscription.EMPTY, it will not be added.
If this subscription is already in an isUnsubscribed state, the passed
tear down logic will be executed immediately.
The additional logic to execute on teardown.
Returns the Subscription used or created to be
added to the inner subscriptions list. This Subscription can be used with
remove() to remove the passed teardown logic from the inner subscriptions
list.
The Observer callback to receive a valueless notification of type
complete from the Observable. Notifies the Observer that the Observable
has finished sending push-based notifications.
The Observer callback to receive notifications of type next from
the Observable, with a value. The Observable may call this method 0 or more
times.
Removes a Subscription from the internal list of subscriptions that will unsubscribe during the unsubscribe process of this Subscription.
The subscription to remove.
A static factory for a Subscriber, given a (potentially partial) definition of an Observer.
A Subscriber wrapping the (partially defined) Observer represented by the given arguments.
Emits only the first count values emitted by the source Observable.
Takes the first count values from the source, then
completes.

take returns an Observable that emits only the first count values emitted
by the source Observable. If the source emits fewer than count values then
all of its values are emitted. After that, it completes, regardless if the
source completes.
The maximum number of next values to emit.
An Observable that emits only the first count
values emitted by the source Observable, or all of the values from the source
if the source emits fewer than count values.
We need this JSDoc comment for affecting ESDoc.
A flag to indicate whether this Subscription has already been unsubscribed.
Adds a tear down to be called during the unsubscribe() of this Subscription.
If the tear down being added is a subscription that is already
unsubscribed, is the same reference add is being called on, or is
Subscription.EMPTY, it will not be added.
If this subscription is already in an isUnsubscribed state, the passed
tear down logic will be executed immediately.
The additional logic to execute on teardown.
Returns the Subscription used or created to be
added to the inner subscriptions list. This Subscription can be used with
remove() to remove the passed teardown logic from the inner subscriptions
list.
The Observer callback to receive a valueless notification of type
complete from the Observable. Notifies the Observer that the Observable
has finished sending push-based notifications.
The Observer callback to receive notifications of type next from
the Observable, with a value. The Observable may call this method 0 or more
times.
Removes a Subscription from the internal list of subscriptions that will unsubscribe during the unsubscribe process of this Subscription.
The subscription to remove.
A static factory for a Subscriber, given a (potentially partial) definition of an Observer.
A Subscriber wrapping the (partially defined) Observer represented by the given arguments.
Emits only the last count values emitted by the source Observable.
Remembers the latest count values, then emits those
only when the source completes.

takeLast returns an Observable that emits at most the last count values
emitted by the source Observable. If the source emits fewer than count
values then all of its values are emitted. This operator must wait until the
complete notification emission from the source in order to emit the next
values on the output Observable, because otherwise it is impossible to know
whether or not more values will be emitted on the source. For this reason,
all values are emitted synchronously, followed by the complete notification.
The maximum number of values to emit from the end of the sequence of values emitted by the source Observable.
An Observable that emits at most the last count values emitted by the source Observable.
We need this JSDoc comment for affecting ESDoc.
A flag to indicate whether this Subscription has already been unsubscribed.
Adds a tear down to be called during the unsubscribe() of this Subscription.
If the tear down being added is a subscription that is already
unsubscribed, is the same reference add is being called on, or is
Subscription.EMPTY, it will not be added.
If this subscription is already in an isUnsubscribed state, the passed
tear down logic will be executed immediately.
The additional logic to execute on teardown.
Returns the Subscription used or created to be
added to the inner subscriptions list. This Subscription can be used with
remove() to remove the passed teardown logic from the inner subscriptions
list.
The Observer callback to receive a valueless notification of type
complete from the Observable. Notifies the Observer that the Observable
has finished sending push-based notifications.
The Observer callback to receive notifications of type next from
the Observable, with a value. The Observable may call this method 0 or more
times.
Removes a Subscription from the internal list of subscriptions that will unsubscribe during the unsubscribe process of this Subscription.
The subscription to remove.
A static factory for a Subscriber, given a (potentially partial) definition of an Observer.
A Subscriber wrapping the (partially defined) Observer represented by the given arguments.
Emits the values emitted by the source Observable until a notifier
Observable emits a value.
Lets values pass until a second Observable,
notifier, emits something. Then, it completes.

takeUntil subscribes and begins mirroring the source Observable. It also
monitors a second Observable, notifier that you provide. If the notifier
emits a value or a complete notification, the output Observable stops
mirroring the source Observable and completes.
The Observable whose first emitted value will
cause the output Observable of takeUntil to stop emitting values from the
source Observable.
An Observable that emits the values from the source
Observable until such time as notifier emits its first value.
We need this JSDoc comment for affecting ESDoc.
A flag to indicate whether this Subscription has already been unsubscribed.
Adds a tear down to be called during the unsubscribe() of this Subscription.
If the tear down being added is a subscription that is already
unsubscribed, is the same reference add is being called on, or is
Subscription.EMPTY, it will not be added.
If this subscription is already in an isUnsubscribed state, the passed
tear down logic will be executed immediately.
The additional logic to execute on teardown.
Returns the Subscription used or created to be
added to the inner subscriptions list. This Subscription can be used with
remove() to remove the passed teardown logic from the inner subscriptions
list.
The Observer callback to receive a valueless notification of type
complete from the Observable. Notifies the Observer that the Observable
has finished sending push-based notifications.
The Observer callback to receive notifications of type next from
the Observable, with a value. The Observable may call this method 0 or more
times.
Removes a Subscription from the internal list of subscriptions that will unsubscribe during the unsubscribe process of this Subscription.
The subscription to remove.
A static factory for a Subscriber, given a (potentially partial) definition of an Observer.
A Subscriber wrapping the (partially defined) Observer represented by the given arguments.
Emits values emitted by the source Observable so long as each value satisfies
the given predicate, and then completes as soon as this predicate is not
satisfied.
Takes values from the source only while they pass the condition given. When the first value does not satisfy, it completes.

takeWhile subscribes and begins mirroring the source Observable. Each value
emitted on the source is given to the predicate function which returns a
boolean, representing a condition to be satisfied by the source values. The
output Observable emits the source values until such time as the predicate
returns false, at which point takeWhile stops mirroring the source
Observable and completes the output Observable.
A function that evaluates a value emitted by the source Observable and returns a boolean. Also takes the (zero-based) index as the second argument.
An Observable that emits the values from the source
Observable so long as each value satisfies the condition defined by the
predicate, then completes.
We need this JSDoc comment for affecting ESDoc.
A flag to indicate whether this Subscription has already been unsubscribed.
Adds a tear down to be called during the unsubscribe() of this Subscription.
If the tear down being added is a subscription that is already
unsubscribed, is the same reference add is being called on, or is
Subscription.EMPTY, it will not be added.
If this subscription is already in an isUnsubscribed state, the passed
tear down logic will be executed immediately.
The additional logic to execute on teardown.
Returns the Subscription used or created to be
added to the inner subscriptions list. This Subscription can be used with
remove() to remove the passed teardown logic from the inner subscriptions
list.
The Observer callback to receive a valueless notification of type
complete from the Observable. Notifies the Observer that the Observable
has finished sending push-based notifications.
The Observer callback to receive notifications of type next from
the Observable, with a value. The Observable may call this method 0 or more
times.
Removes a Subscription from the internal list of subscriptions that will unsubscribe during the unsubscribe process of this Subscription.
The subscription to remove.
A static factory for a Subscriber, given a (potentially partial) definition of an Observer.
A Subscriber wrapping the (partially defined) Observer represented by the given arguments.
Emits a value from the source Observable, then ignores subsequent source values for a duration determined by another Observable, then repeats this process.
It's like throttleTime, but the silencing duration is determined by a second Observable.

throttle emits the source Observable values on the output Observable
when its internal timer is disabled, and ignores source values when the timer
is enabled. Initially, the timer is disabled. As soon as the first source
value arrives, it is forwarded to the output Observable, and then the timer
is enabled by calling the durationSelector function with the source value,
which returns the "duration" Observable. When the duration Observable emits a
value or completes, the timer is disabled, and this process repeats for the
next source value.
A function that receives a value from the source Observable, for computing the silencing duration for each source value, returned as an Observable or a Promise.
An Observable that performs the throttle operation to limit the rate of emissions from the source.
We need this JSDoc comment for affecting ESDoc.
A flag to indicate whether this Subscription has already been unsubscribed.
Adds a tear down to be called during the unsubscribe() of this Subscription.
If the tear down being added is a subscription that is already
unsubscribed, is the same reference add is being called on, or is
Subscription.EMPTY, it will not be added.
If this subscription is already in an isUnsubscribed state, the passed
tear down logic will be executed immediately.
The additional logic to execute on teardown.
Returns the Subscription used or created to be
added to the inner subscriptions list. This Subscription can be used with
remove() to remove the passed teardown logic from the inner subscriptions
list.
The Observer callback to receive a valueless notification of type
complete from the Observable. Notifies the Observer that the Observable
has finished sending push-based notifications.
The Observer callback to receive notifications of type next from
the Observable, with a value. The Observable may call this method 0 or more
times.
Removes a Subscription from the internal list of subscriptions that will unsubscribe during the unsubscribe process of this Subscription.
The subscription to remove.
A static factory for a Subscriber, given a (potentially partial) definition of an Observer.
A Subscriber wrapping the (partially defined) Observer represented by the given arguments.
Emits a value from the source Observable, then ignores subsequent source
values for duration milliseconds, then repeats this process.
Lets a value pass, then ignores source values for the
next duration milliseconds.

throttleTime emits the source Observable values on the output Observable
when its internal timer is disabled, and ignores source values when the timer
is enabled. Initially, the timer is disabled. As soon as the first source
value arrives, it is forwarded to the output Observable, and then the timer
is enabled. After duration milliseconds (or the time unit determined
internally by the optional scheduler) has passed, the timer is disabled,
and this process repeats for the next source value. Optionally takes a
Scheduler for managing timers.
Time to wait before emitting another value after
emitting the last value, measured in milliseconds or the time unit determined
internally by the optional scheduler.
An Observable that performs the throttle operation to limit the rate of emissions from the source.
We need this JSDoc comment for affecting ESDoc.
A flag to indicate whether this Subscription has already been unsubscribed.
Adds a tear down to be called during the unsubscribe() of this Subscription.
If the tear down being added is a subscription that is already
unsubscribed, is the same reference add is being called on, or is
Subscription.EMPTY, it will not be added.
If this subscription is already in an isUnsubscribed state, the passed
tear down logic will be executed immediately.
The additional logic to execute on teardown.
Returns the Subscription used or created to be
added to the inner subscriptions list. This Subscription can be used with
remove() to remove the passed teardown logic from the inner subscriptions
list.
The Observer callback to receive a valueless notification of type
complete from the Observable. Notifies the Observer that the Observable
has finished sending push-based notifications.
The Observer callback to receive notifications of type next from
the Observable, with a value. The Observable may call this method 0 or more
times.
Removes a Subscription from the internal list of subscriptions that will unsubscribe during the unsubscribe process of this Subscription.
The subscription to remove.
A static factory for a Subscriber, given a (potentially partial) definition of an Observer.
A Subscriber wrapping the (partially defined) Observer represented by the given arguments.
We need this JSDoc comment for affecting ESDoc.
A flag to indicate whether this Subscription has already been unsubscribed.
Adds a tear down to be called during the unsubscribe() of this Subscription.
If the tear down being added is a subscription that is already
unsubscribed, is the same reference add is being called on, or is
Subscription.EMPTY, it will not be added.
If this subscription is already in an isUnsubscribed state, the passed
tear down logic will be executed immediately.
The additional logic to execute on teardown.
Returns the Subscription used or created to be
added to the inner subscriptions list. This Subscription can be used with
remove() to remove the passed teardown logic from the inner subscriptions
list.
The Observer callback to receive a valueless notification of type
complete from the Observable. Notifies the Observer that the Observable
has finished sending push-based notifications.
The Observer callback to receive notifications of type next from
the Observable, with a value. The Observable may call this method 0 or more
times.
Removes a Subscription from the internal list of subscriptions that will unsubscribe during the unsubscribe process of this Subscription.
The subscription to remove.
A static factory for a Subscriber, given a (potentially partial) definition of an Observer.
A Subscriber wrapping the (partially defined) Observer represented by the given arguments.
We need this JSDoc comment for affecting ESDoc.
A flag to indicate whether this Subscription has already been unsubscribed.
Adds a tear down to be called during the unsubscribe() of this Subscription.
If the tear down being added is a subscription that is already
unsubscribed, is the same reference add is being called on, or is
Subscription.EMPTY, it will not be added.
If this subscription is already in an isUnsubscribed state, the passed
tear down logic will be executed immediately.
The additional logic to execute on teardown.
Returns the Subscription used or created to be
added to the inner subscriptions list. This Subscription can be used with
remove() to remove the passed teardown logic from the inner subscriptions
list.
The Observer callback to receive a valueless notification of type
complete from the Observable. Notifies the Observer that the Observable
has finished sending push-based notifications.
The Observer callback to receive notifications of type next from
the Observable, with a value. The Observable may call this method 0 or more
times.
Removes a Subscription from the internal list of subscriptions that will unsubscribe during the unsubscribe process of this Subscription.
The subscription to remove.
A static factory for a Subscriber, given a (potentially partial) definition of an Observer.
A Subscriber wrapping the (partially defined) Observer represented by the given arguments.
A flag to indicate whether this Subscription has already been unsubscribed.
Adds a tear down to be called during the unsubscribe() of this Subscription.
If the tear down being added is a subscription that is already
unsubscribed, is the same reference add is being called on, or is
Subscription.EMPTY, it will not be added.
If this subscription is already in an isUnsubscribed state, the passed
tear down logic will be executed immediately.
The additional logic to execute on teardown.
Returns the Subscription used or created to be
added to the inner subscriptions list. This Subscription can be used with
remove() to remove the passed teardown logic from the inner subscriptions
list.
The Observer callback to receive a valueless notification of type
complete from the Observable. Notifies the Observer that the Observable
has finished sending push-based notifications.
The Observer callback to receive notifications of type next from
the Observable, with a value. The Observable may call this method 0 or more
times.
Removes a Subscription from the internal list of subscriptions that will unsubscribe during the unsubscribe process of this Subscription.
The subscription to remove.
A static factory for a Subscriber, given a (potentially partial) definition of an Observer.
A Subscriber wrapping the (partially defined) Observer represented by the given arguments.
We need this JSDoc comment for affecting ESDoc.
A flag to indicate whether this Subscription has already been unsubscribed.
Adds a tear down to be called during the unsubscribe() of this Subscription.
If the tear down being added is a subscription that is already
unsubscribed, is the same reference add is being called on, or is
Subscription.EMPTY, it will not be added.
If this subscription is already in an isUnsubscribed state, the passed
tear down logic will be executed immediately.
The additional logic to execute on teardown.
Returns the Subscription used or created to be
added to the inner subscriptions list. This Subscription can be used with
remove() to remove the passed teardown logic from the inner subscriptions
list.
The Observer callback to receive a valueless notification of type
complete from the Observable. Notifies the Observer that the Observable
has finished sending push-based notifications.
The Observer callback to receive notifications of type next from
the Observable, with a value. The Observable may call this method 0 or more
times.
Removes a Subscription from the internal list of subscriptions that will unsubscribe during the unsubscribe process of this Subscription.
The subscription to remove.
A static factory for a Subscriber, given a (potentially partial) definition of an Observer.
A Subscriber wrapping the (partially defined) Observer represented by the given arguments.
We need this JSDoc comment for affecting ESDoc.
A flag to indicate whether this Subscription has already been unsubscribed.
Adds a tear down to be called during the unsubscribe() of this Subscription.
If the tear down being added is a subscription that is already
unsubscribed, is the same reference add is being called on, or is
Subscription.EMPTY, it will not be added.
If this subscription is already in an isUnsubscribed state, the passed
tear down logic will be executed immediately.
The additional logic to execute on teardown.
Returns the Subscription used or created to be
added to the inner subscriptions list. This Subscription can be used with
remove() to remove the passed teardown logic from the inner subscriptions
list.
The Observer callback to receive a valueless notification of type
complete from the Observable. Notifies the Observer that the Observable
has finished sending push-based notifications.
The Observer callback to receive notifications of type next from
the Observable, with a value. The Observable may call this method 0 or more
times.
Removes a Subscription from the internal list of subscriptions that will unsubscribe during the unsubscribe process of this Subscription.
The subscription to remove.
A static factory for a Subscriber, given a (potentially partial) definition of an Observer.
A Subscriber wrapping the (partially defined) Observer represented by the given arguments.
Branch out the source Observable values as a nested Observable whenever
windowBoundaries emits.
It's like buffer, but emits a nested Observable instead of an array.

Returns an Observable that emits windows of items it collects from the source
Observable. The output Observable emits connected, non-overlapping
windows. It emits the current window and opens a new one whenever the
Observable windowBoundaries emits an item. Because each window is an
Observable, the output is a higher-order Observable.
An Observable that completes the previous window and starts a new window.
An Observable of windows, which are Observables emitting values of the source Observable.
We need this JSDoc comment for affecting ESDoc.
A flag to indicate whether this Subscription has already been unsubscribed.
Adds a tear down to be called during the unsubscribe() of this Subscription.
If the tear down being added is a subscription that is already
unsubscribed, is the same reference add is being called on, or is
Subscription.EMPTY, it will not be added.
If this subscription is already in an isUnsubscribed state, the passed
tear down logic will be executed immediately.
The additional logic to execute on teardown.
Returns the Subscription used or created to be
added to the inner subscriptions list. This Subscription can be used with
remove() to remove the passed teardown logic from the inner subscriptions
list.
The Observer callback to receive a valueless notification of type
complete from the Observable. Notifies the Observer that the Observable
has finished sending push-based notifications.
The Observer callback to receive notifications of type next from
the Observable, with a value. The Observable may call this method 0 or more
times.
Removes a Subscription from the internal list of subscriptions that will unsubscribe during the unsubscribe process of this Subscription.
The subscription to remove.
A static factory for a Subscriber, given a (potentially partial) definition of an Observer.
A Subscriber wrapping the (partially defined) Observer represented by the given arguments.
Branch out the source Observable values as a nested Observable with each
nested Observable emitting at most windowSize values.
It's like bufferCount, but emits a nested Observable instead of an array.

Returns an Observable that emits windows of items it collects from the source
Observable. The output Observable emits windows every startWindowEvery
items, each containing no more than windowSize items. When the source
Observable completes or encounters an error, the output Observable emits
the current window and propagates the notification from the source
Observable. If startWindowEvery is not provided, then new windows are
started immediately at the start of the source and when each window completes
with size windowSize.
The maximum number of values emitted by each window.
An Observable of windows, which in turn are Observable of values.
We need this JSDoc comment for affecting ESDoc.
A flag to indicate whether this Subscription has already been unsubscribed.
Adds a tear down to be called during the unsubscribe() of this Subscription.
If the tear down being added is a subscription that is already
unsubscribed, is the same reference add is being called on, or is
Subscription.EMPTY, it will not be added.
If this subscription is already in an isUnsubscribed state, the passed
tear down logic will be executed immediately.
The additional logic to execute on teardown.
Returns the Subscription used or created to be
added to the inner subscriptions list. This Subscription can be used with
remove() to remove the passed teardown logic from the inner subscriptions
list.
The Observer callback to receive a valueless notification of type
complete from the Observable. Notifies the Observer that the Observable
has finished sending push-based notifications.
The Observer callback to receive notifications of type next from
the Observable, with a value. The Observable may call this method 0 or more
times.
Removes a Subscription from the internal list of subscriptions that will unsubscribe during the unsubscribe process of this Subscription.
The subscription to remove.
A static factory for a Subscriber, given a (potentially partial) definition of an Observer.
A Subscriber wrapping the (partially defined) Observer represented by the given arguments.
Branch out the source Observable values as a nested Observable periodically in time.
It's like bufferTime, but emits a nested Observable instead of an array.

Returns an Observable that emits windows of items it collects from the source
Observable. The output Observable starts a new window periodically, as
determined by the windowCreationInterval argument. It emits each window
after a fixed timespan, specified by the windowTimeSpan argument. When the
source Observable completes or encounters an error, the output Observable
emits the current window and propagates the notification from the source
Observable. If windowCreationInterval is not provided, the output
Observable starts a new window when the previous window of duration
windowTimeSpan completes.
The amount of time to fill each window.
An observable of windows, which in turn are Observables.
We need this JSDoc comment for affecting ESDoc.
A flag to indicate whether this Subscription has already been unsubscribed.
Adds a tear down to be called during the unsubscribe() of this Subscription.
If the tear down being added is a subscription that is already
unsubscribed, is the same reference add is being called on, or is
Subscription.EMPTY, it will not be added.
If this subscription is already in an isUnsubscribed state, the passed
tear down logic will be executed immediately.
The additional logic to execute on teardown.
Returns the Subscription used or created to be
added to the inner subscriptions list. This Subscription can be used with
remove() to remove the passed teardown logic from the inner subscriptions
list.
The Observer callback to receive a valueless notification of type
complete from the Observable. Notifies the Observer that the Observable
has finished sending push-based notifications.
The Observer callback to receive notifications of type next from
the Observable, with a value. The Observable may call this method 0 or more
times.
Removes a Subscription from the internal list of subscriptions that will unsubscribe during the unsubscribe process of this Subscription.
The subscription to remove.
A static factory for a Subscriber, given a (potentially partial) definition of an Observer.
A Subscriber wrapping the (partially defined) Observer represented by the given arguments.
Branch out the source Observable values as a nested Observable starting from
an emission from openings and ending when the output of closingSelector
emits.
It's like bufferToggle, but emits a nested Observable instead of an array.

Returns an Observable that emits windows of items it collects from the source
Observable. The output Observable emits windows that contain those items
emitted by the source Observable between the time when the openings
Observable emits an item and when the Observable returned by
closingSelector emits an item.
An observable of notifications to start new windows.
A function that takes
the value emitted by the openings observable and returns an Observable,
which, when it emits (either next or complete), signals that the
associated window should complete.
An observable of windows, which in turn are Observables.
We need this JSDoc comment for affecting ESDoc.
A flag to indicate whether this Subscription has already been unsubscribed.
Adds a tear down to be called during the unsubscribe() of this Subscription.
If the tear down being added is a subscription that is already
unsubscribed, is the same reference add is being called on, or is
Subscription.EMPTY, it will not be added.
If this subscription is already in an isUnsubscribed state, the passed
tear down logic will be executed immediately.
The additional logic to execute on teardown.
Returns the Subscription used or created to be
added to the inner subscriptions list. This Subscription can be used with
remove() to remove the passed teardown logic from the inner subscriptions
list.
The Observer callback to receive a valueless notification of type
complete from the Observable. Notifies the Observer that the Observable
has finished sending push-based notifications.
The Observer callback to receive notifications of type next from
the Observable, with a value. The Observable may call this method 0 or more
times.
Removes a Subscription from the internal list of subscriptions that will unsubscribe during the unsubscribe process of this Subscription.
The subscription to remove.
A static factory for a Subscriber, given a (potentially partial) definition of an Observer.
A Subscriber wrapping the (partially defined) Observer represented by the given arguments.
Branch out the source Observable values as a nested Observable using a factory function of closing Observables to determine when to start a new window.
It's like bufferWhen, but emits a nested Observable instead of an array.

Returns an Observable that emits windows of items it collects from the source
Observable. The output Observable emits connected, non-overlapping windows.
It emits the current window and opens a new one whenever the Observable
produced by the specified closingSelector function emits an item. The first
window is opened immediately when subscribing to the output Observable.
A function that takes no
arguments and returns an Observable that signals (on either next or
complete) when to close the previous window and start a new one.
An observable of windows, which in turn are Observables.
We need this JSDoc comment for affecting ESDoc.
A flag to indicate whether this Subscription has already been unsubscribed.
Adds a tear down to be called during the unsubscribe() of this Subscription.
If the tear down being added is a subscription that is already
unsubscribed, is the same reference add is being called on, or is
Subscription.EMPTY, it will not be added.
If this subscription is already in an isUnsubscribed state, the passed
tear down logic will be executed immediately.
The additional logic to execute on teardown.
Returns the Subscription used or created to be
added to the inner subscriptions list. This Subscription can be used with
remove() to remove the passed teardown logic from the inner subscriptions
list.
The Observer callback to receive a valueless notification of type
complete from the Observable. Notifies the Observer that the Observable
has finished sending push-based notifications.
The Observer callback to receive notifications of type next from
the Observable, with a value. The Observable may call this method 0 or more
times.
Removes a Subscription from the internal list of subscriptions that will unsubscribe during the unsubscribe process of this Subscription.
The subscription to remove.
A static factory for a Subscriber, given a (potentially partial) definition of an Observer.
A Subscriber wrapping the (partially defined) Observer represented by the given arguments.
Combines the source Observable with other Observables to create an Observable whose values are calculated from the latest values of each, only when the source emits.
Whenever the source Observable emits a value, it computes a formula using that value plus the latest values from other input Observables, then emits the output of that formula.

withLatestFrom combines each value from the source Observable (the
instance) with the latest values from the other input Observables only when
the source emits a value, optionally using a project function to determine
the value to be emitted on the output Observable. All input Observables must
emit at least one value before the output Observable will emit a value.
An Observable of projected values from the most recent values from each input Observable, or an array of the most recent values from each input Observable.
We need this JSDoc comment for affecting ESDoc.
A flag to indicate whether this Subscription has already been unsubscribed.
Adds a tear down to be called during the unsubscribe() of this Subscription.
If the tear down being added is a subscription that is already
unsubscribed, is the same reference add is being called on, or is
Subscription.EMPTY, it will not be added.
If this subscription is already in an isUnsubscribed state, the passed
tear down logic will be executed immediately.
The additional logic to execute on teardown.
Returns the Subscription used or created to be
added to the inner subscriptions list. This Subscription can be used with
remove() to remove the passed teardown logic from the inner subscriptions
list.
The Observer callback to receive a valueless notification of type
complete from the Observable. Notifies the Observer that the Observable
has finished sending push-based notifications.
Removes a Subscription from the internal list of subscriptions that will unsubscribe during the unsubscribe process of this Subscription.
The subscription to remove.
A static factory for a Subscriber, given a (potentially partial) definition of an Observer.
A Subscriber wrapping the (partially defined) Observer represented by the given arguments.
We need this JSDoc comment for affecting ESDoc.
A flag to indicate whether this Subscription has already been unsubscribed.
Adds a tear down to be called during the unsubscribe() of this Subscription.
If the tear down being added is a subscription that is already
unsubscribed, is the same reference add is being called on, or is
Subscription.EMPTY, it will not be added.
If this subscription is already in an isUnsubscribed state, the passed
tear down logic will be executed immediately.
The additional logic to execute on teardown.
Returns the Subscription used or created to be
added to the inner subscriptions list. This Subscription can be used with
remove() to remove the passed teardown logic from the inner subscriptions
list.
The Observer callback to receive a valueless notification of type
complete from the Observable. Notifies the Observer that the Observable
has finished sending push-based notifications.
The Observer callback to receive notifications of type next from
the Observable, with a value. The Observable may call this method 0 or more
times.
Removes a Subscription from the internal list of subscriptions that will unsubscribe during the unsubscribe process of this Subscription.
The subscription to remove.
A static factory for a Subscriber, given a (potentially partial) definition of an Observer.
A Subscriber wrapping the (partially defined) Observer represented by the given arguments.
A flag to indicate whether this Subscription has already been unsubscribed.
Adds a tear down to be called during the unsubscribe() of this Subscription.
If the tear down being added is a subscription that is already
unsubscribed, is the same reference add is being called on, or is
Subscription.EMPTY, it will not be added.
If this subscription is already in an isUnsubscribed state, the passed
tear down logic will be executed immediately.
The additional logic to execute on teardown.
Returns the Subscription used or created to be
added to the inner subscriptions list. This Subscription can be used with
remove() to remove the passed teardown logic from the inner subscriptions
list.
Removes a Subscription from the internal list of subscriptions that will unsubscribe during the unsubscribe process of this Subscription.
The subscription to remove.
Disposes the resources held by the subscription. May, for instance, cancel an ongoing Observable execution or cancel any other type of work that started when the Subscription was created.
We need this JSDoc comment for affecting ESDoc.
A flag to indicate whether this Subscription has already been unsubscribed.
Adds a tear down to be called during the unsubscribe() of this Subscription.
If the tear down being added is a subscription that is already
unsubscribed, is the same reference add is being called on, or is
Subscription.EMPTY, it will not be added.
If this subscription is already in an isUnsubscribed state, the passed
tear down logic will be executed immediately.
The additional logic to execute on teardown.
Returns the Subscription used or created to be
added to the inner subscriptions list. This Subscription can be used with
remove() to remove the passed teardown logic from the inner subscriptions
list.
Removes a Subscription from the internal list of subscriptions that will unsubscribe during the unsubscribe process of this Subscription.
The subscription to remove.
Disposes the resources held by the subscription. May, for instance, cancel an ongoing Observable execution or cancel any other type of work that started when the Subscription was created.
We need this JSDoc comment for affecting ESDoc.
A flag to indicate whether this Subscription has already been unsubscribed.
Adds a tear down to be called during the unsubscribe() of this Subscription.
If the tear down being added is a subscription that is already
unsubscribed, is the same reference add is being called on, or is
Subscription.EMPTY, it will not be added.
If this subscription is already in an isUnsubscribed state, the passed
tear down logic will be executed immediately.
The additional logic to execute on teardown.
Returns the Subscription used or created to be
added to the inner subscriptions list. This Subscription can be used with
remove() to remove the passed teardown logic from the inner subscriptions
list.
Removes a Subscription from the internal list of subscriptions that will unsubscribe during the unsubscribe process of this Subscription.
The subscription to remove.
Disposes the resources held by the subscription. May, for instance, cancel an ongoing Observable execution or cancel any other type of work that started when the Subscription was created.
We need this JSDoc comment for affecting ESDoc.
A flag to indicate whether this Subscription has already been unsubscribed.
Adds a tear down to be called during the unsubscribe() of this Subscription.
If the tear down being added is a subscription that is already
unsubscribed, is the same reference add is being called on, or is
Subscription.EMPTY, it will not be added.
If this subscription is already in an isUnsubscribed state, the passed
tear down logic will be executed immediately.
The additional logic to execute on teardown.
Returns the Subscription used or created to be
added to the inner subscriptions list. This Subscription can be used with
remove() to remove the passed teardown logic from the inner subscriptions
list.
Removes a Subscription from the internal list of subscriptions that will unsubscribe during the unsubscribe process of this Subscription.
The subscription to remove.
Disposes the resources held by the subscription. May, for instance, cancel an ongoing Observable execution or cancel any other type of work that started when the Subscription was created.
A unit of work to be executed in a Scheduler. An action is typically created from within a Scheduler and an RxJS user does not need to concern themselves about creating and manipulating an Action.
interface Action extends Subscription {
work: (state?: any) => void|Subscription;
state?: any;
delay?: number;
schedule(state?: any, delay?: number): void;
execute(): void;
scheduler: Scheduler;
error: any;
}
Represents the time (relative to the Scheduler's own clock) when this action should be executed.
A reference to the latest error that may have occurred during action execution.
A flag to indicate whether this Subscription has already been unsubscribed.
The Scheduler which owns this action.
The current state. This is the object that will be given to the work
method.
Adds a tear down to be called during the unsubscribe() of this Subscription.
If the tear down being added is a subscription that is already
unsubscribed, is the same reference add is being called on, or is
Subscription.EMPTY, it will not be added.
If this subscription is already in an isUnsubscribed state, the passed
tear down logic will be executed immediately.
The additional logic to execute on teardown.
Returns the Subscription used or created to be
added to the inner subscriptions list. This Subscription can be used with
remove() to remove the passed teardown logic from the inner subscriptions
list.
Immediately executes this action and the work it contains.
Removes a Subscription from the internal list of subscriptions that will unsubscribe during the unsubscribe process of this Subscription.
The subscription to remove.
Schedules this action on its parent Scheduler for execution. May be passed
some context object, state. May happen at some point in the future,
according to the delay parameter, if specified.
Disposes the resources held by the subscription. May, for instance, cancel an ongoing Observable execution or cancel any other type of work that started when the Subscription was created.
The function that represents the raw work to be executed on a Scheduler.
A subscription in order to be able to unsubscribe the scheduled work.
We need this JSDoc comment for affecting ESDoc.
A flag to indicate whether this Subscription has already been unsubscribed.
Adds a tear down to be called during the unsubscribe() of this Subscription.
If the tear down being added is a subscription that is already
unsubscribed, is the same reference add is being called on, or is
Subscription.EMPTY, it will not be added.
If this subscription is already in an isUnsubscribed state, the passed
tear down logic will be executed immediately.
The additional logic to execute on teardown.
Returns the Subscription used or created to be
added to the inner subscriptions list. This Subscription can be used with
remove() to remove the passed teardown logic from the inner subscriptions
list.
Removes a Subscription from the internal list of subscriptions that will unsubscribe during the unsubscribe process of this Subscription.
The subscription to remove.
Disposes the resources held by the subscription. May, for instance, cancel an ongoing Observable execution or cancel any other type of work that started when the Subscription was created.
We need this JSDoc comment for affecting ESDoc.
A flag to indicate whether this Subscription has already been unsubscribed.
Adds a tear down to be called during the unsubscribe() of this Subscription.
If the tear down being added is a subscription that is already
unsubscribed, is the same reference add is being called on, or is
Subscription.EMPTY, it will not be added.
If this subscription is already in an isUnsubscribed state, the passed
tear down logic will be executed immediately.
The additional logic to execute on teardown.
Returns the Subscription used or created to be
added to the inner subscriptions list. This Subscription can be used with
remove() to remove the passed teardown logic from the inner subscriptions
list.
Removes a Subscription from the internal list of subscriptions that will unsubscribe during the unsubscribe process of this Subscription.
The subscription to remove.
We need this JSDoc comment for affecting ESDoc.
An interop point defined by the es7-observable spec https://github.com/zenparsing/es-observable
this instance of the observable
a handler for each value emitted by the observable
a promise that either resolves on observable completion or rejects with the handled error
Creates a new Observable, with this Observable as the source, and the passed operator defined as the new observable's operator.
the operator defining the operation to take on the observable
a new observable with the Operator applied
Registers handlers for handling emitted values, error and completions from the observable, and executes the observable's subscriber function, which will take action to set up the underlying data stream
(optional) either an observer defining all functions to be called, or the first of three possible handlers, which is the handler for each value emitted from the observable.
(optional) a handler for a terminal event resulting from an error. If no error handler is provided, the error will be thrown as unhandled
(optional) a handler for a terminal event resulting from successful completion.
a subscription reference to the registered handlers
Creates a new cold Observable by calling the Observable constructor
a new cold observable
We need this JSDoc comment for affecting ESDoc.
a handler for each value emitted by the observable
a promise that either resolves on observable completion or rejects with the handled error
Registers handlers for handling emitted values, error and completions from the observable, and executes the observable's subscriber function, which will take action to set up the underlying data stream
(optional) either an observer defining all functions to be called, or the first of three possible handlers, which is the handler for each value emitted from the observable.
(optional) a handler for a terminal event resulting from an error. If no error handler is provided, the error will be thrown as unhandled
(optional) a handler for a terminal event resulting from successful completion.
a subscription reference to the registered handlers
An error thrown when an element was queried at a certain index of an Observable, but no such index or position exists in that sequence.
An error thrown when an Observable or a sequence was queried but has no elements.
An error thrown when an action is invalid because the object has been unsubscribed.
An error thrown when one or more errors have occurred during the
unsubscribe of a Subscription.
Delay in milliseconds when the Task will run.
A periodic [MacroTask] is such which get automatically rescheduled after it is executed.
Delay in milliseconds when the Task will run.
A periodic [MacroTask] is such which get automatically rescheduled after it is executed.
Delay in milliseconds when the Task will run.
A periodic [MacroTask] is such which get automatically rescheduled after it is executed.
Suppress closure compiler errors about unknown 'process' variable
Function which needs to be executed by the Task after the [Zone.currentTask] has been set to the current task.
Represents the default work which needs to be done to un-schedule the Task from the VM. Not all Tasks are cancelable, and therefore this method is optional.
A zone may chose to intercept this function and perform its own scheduling.
Task specific options associated with the current task. This is passed to the scheduleFn.
The Function to be used by the VM on entering the [Task]. This function will delegate to
[Zone.runTask] and delegate to callback.
Number of times the task has been executed, or -1 if canceled.
Represents the default work which needs to be done to schedule the Task by the VM.
A zone may chose to intercept this function and perform its own scheduling.
Debug string representing the API which requested the scheduling of the task.
Task type: microTask, macroTask, eventTask.
Function which needs to be executed by the Task after the [Zone.currentTask] has been set to the current task.
Represents the default work which needs to be done to un-schedule the Task from the VM. Not all Tasks are cancelable, and therefore this method is optional.
A zone may chose to intercept this function and perform its own scheduling.
Task specific options associated with the current task. This is passed to the scheduleFn.
The Function to be used by the VM on entering the [Task]. This function will delegate to
[Zone.runTask] and delegate to callback.
Number of times the task has been executed, or -1 if canceled.
Represents the default work which needs to be done to schedule the Task by the VM.
A zone may chose to intercept this function and perform its own scheduling.
Debug string representing the API which requested the scheduling of the task.
Task type: microTask, macroTask, eventTask.
Function which needs to be executed by the Task after the [Zone.currentTask] has been set to the current task.
Represents the default work which needs to be done to un-schedule the Task from the VM. Not all Tasks are cancelable, and therefore this method is optional.
A zone may chose to intercept this function and perform its own scheduling.
Task specific options associated with the current task. This is passed to the scheduleFn.
The Function to be used by the VM on entering the [Task]. This function will delegate to
[Zone.runTask] and delegate to callback.
Number of times the task has been executed, or -1 if canceled.
Represents the default work which needs to be done to schedule the Task by the VM.
A zone may chose to intercept this function and perform its own scheduling.
Debug string representing the API which requested the scheduling of the task.
Task type: microTask, macroTask, eventTask.
Represents work which is executed with a clean stack.
Tasks are used in Zones to mark work which is performed on clean stack frame. There are three kinds of task. [MicroTask], [MacroTask], and [EventTask].
A JS VM can be modeled as a [MicroTask] queue, [MacroTask] queue, and [EventTask] set.
Function which needs to be executed by the Task after the [Zone.currentTask] has been set to the current task.
Represents the default work which needs to be done to un-schedule the Task from the VM. Not all Tasks are cancelable, and therefore this method is optional.
A zone may chose to intercept this function and perform its own scheduling.
Task specific options associated with the current task. This is passed to the scheduleFn.
The Function to be used by the VM on entering the [Task]. This function will delegate to
[Zone.runTask] and delegate to callback.
Number of times the task has been executed, or -1 if canceled.
Represents the default work which needs to be done to schedule the Task by the VM.
A zone may chose to intercept this function and perform its own scheduling.
Debug string representing the API which requested the scheduling of the task.
Task type: microTask, macroTask, eventTask.
Delay in milliseconds when the Task will run.
A periodic [MacroTask] is such which get automatically rescheduled after it is executed.
Zone is a mechanism for intercepting and keeping track of asynchronous work.
A Zone is a global object which is configured with rules about how to intercept and keep track of the asynchronous callbacks. Zone has these responsibilities:
A zone by itself does not do anything, instead it relies on some other code to route existing platform API through it. (The zone library ships with code which monkey patches all of the browsers's asynchronous API and redirects them through the zone for interception.)
In its simplest form a zone allows one to intercept the scheduling and calling of asynchronous operations, and execute additional code before as well as after the asynchronous task. The rules of interception are configured using [ZoneConfig]. There can be many different zone instances in a system, but only one zone is active at any given time which can be retrieved using [Zone#current].
An important aspect of the zones is that they should persist across asynchronous operations. To
achieve this, when a future work is scheduled through async API, it is necessary to capture, and
subsequently restore the current zone. For example if a code is running in zone b and it
invokes setTimeout to scheduleTask work later, the setTimeout method needs to 1) capture the
current zone and 2) wrap the wrapCallback in code which will restore the current zone b once
the wrapCallback executes. In this way the rules which govern the current code are preserved in
all future asynchronous tasks. There could be a different zone c which has different rules and
is associated with different asynchronous tasks. As these tasks are processed, each asynchronous
wrapCallback correctly restores the correct zone, as well as preserves the zone for future
asynchronous callbacks.
Example: Suppose a browser page consist of application code as well as third-party
advertisement code. (These two code bases are independent, developed by different mutually
unaware developers.) The application code may be interested in doing global error handling and
so it configures the app zone to send all of the errors to the server for analysis, and then
executes the application in the app zone. The advertising code is interested in the same
error processing but it needs to send the errors to a different third-party. So it creates the
ads zone with a different error handler. Now both advertising as well as application code
create many asynchronous operations, but the [Zone] will ensure that all of the asynchronous
operations created from the application code will execute in app zone with its error
handler and all of the advertisement code will execute in the ads zone with its error handler.
This will not only work for the async operations created directly, but also for all subsequent
asynchronous operations.
If you think of chain of asynchronous operations as a thread of execution (bit of a stretch) then [Zone#current] will act as a thread local variable.
In addition to wrapping the callbacks to restore the zone, all operations which cause a
scheduling of work for later are routed through the current zone which is allowed to intercept
them by adding work before or after the wrapCallback as well as using different means of
achieving the request. (Useful for unit testing, or tracking of requests). In some instances
such as setTimeout the wrapping of the wrapCallback and scheduling is done in the same
wrapCallback, but there are other examples such as Promises where the then wrapCallback is
wrapped, but the execution of then in triggered by Promise scheduling resolve work.
Fundamentally there are three kinds of tasks which can be scheduled:
setTimeout. This is typically cancelable
which is guaranteed to execute at least once after some well understood delay.Each asynchronous API is modeled and routed through one of these APIs.
[MicroTask]s represent work which will be done in current VM turn as soon as possible, before VM yielding.
[TimerTask]s represents work which will be done after some delay. (Sometimes the delay is
approximate such as on next available animation frame). Typically these methods include:
setTimeout, setImmediate, setInterval, requestAnimationFrame, and all browser specif
variants.
[EventTask]s represents a request to create a listener on an event. Unlike the other task events may never be executed, but typically execute more then once. There is no queue of events, rather their callbacks are unpredictable both in order and time.
Zones can be composed together through [Zone.fork()]. A child zone may create its own set of rules. A child zone is expected to either:
Composability allows zones to keep their concerns clean. For example a top most zone may chose to handle error handling, while child zones may chose to do user action tracking.
At the start the browser will run in a special root zone, which is configure to behave exactly like the platform, making any existing code which is not-zone aware behave as expected. All zones are children of the root zone.
Allows the zone to intercept canceling of scheduled Task.
The interception is configured using [ZoneSpec.onCancelTask]. The default canceler invokes the [Task.cancelFn].
Used to create a child zone.
A set of rules which the child zone should follow.
A new child zone.
Returns a value associated with the key.
If the current zone does not have a key, the request is delegated to the parent zone. Use [ZoneSpec.properties] to configure the set of properties asseciated with the current zone.
The key to retrieve.
Tha value for the key, or undefined if not found.
Invokes a function in a given zone.
The invocation of callback can be intercepted be declaring [ZoneSpec.onInvoke].
The function to invoke.
A unique debug location of the API being invoked.
Value from the callback function.
Invokes a function in a given zone and catches any exceptions.
Any exceptions thrown will be forwarded to [Zone.HandleError].
The invocation of callback can be intercepted be declaring [ZoneSpec.onInvoke]. The
handling of exceptions can intercepted by declaring [ZoneSpec.handleError].
The function to invoke.
A unique debug location of the API being invoked.
Value from the callback function.
Execute the Task by restoring the [Zone.currentTask] in the Task's zone.
Wraps a callback function in a new function which will properly restore the current zone upon invocation.
The wrapped function will properly forward this as well as arguments to the callback.
Before the function is wrapped the zone can intercept the callback by declaring
[ZoneSpec.onIntercept].
the function which will be wrapped in the zone.
A unique debug location of the API being wrapped.
A function which will invoke the callback through [Zone.runGuarded].
A delegate when intercepting zone operations.
A ZoneDelegate is needed because a child zone can't simply invoke a method on a parent zone. For example a child zone wrap can't just call parent zone wrap. Doing so would create a callback which is bound to the parent zone. What we are interested is intercepting the callback before it is bound to any zone. Furthermore, we also need to pass the targetZone (zone which received the original request) to the delegate.
The ZoneDelegate methods mirror those of Zone with an addition of extra targetZone argument in the method signature. (The original Zone which received the request.) Some methods are renamed to prevent confusion, because they have slightly different semantics and arguments.
wrap => intercept: The wrap method delegates to intercept. The wrap method returns
a callback which will run in a given zone, where as intercept allows wrapping the callback
so that additional code can be run before and after, but does not associated the callback
with the zone.run => invoke: The run method delegates to invoke to perform the actual execution of
the callback. The run method switches to new zone; saves and restores the Zone.current;
and optionally performs error handling. The invoke is not responsible for error handling,
or zone management.
Not every method is usually overwritten in the child zone, for this reason the ZoneDelegate stores the closest zone which overwrites this behavior along with the closest ZoneSpec.
NOTE: We have tried to make this API analogous to Event bubbling with target and current properties.
Note: The ZoneDelegate treats ZoneSpec as class. This allows the ZoneSpec to use its this to
store internal state.
Provides a way to configure the interception of zone events.
Only the name property is required (all other are optional).
The name of the zone. Usefull when debugging Zones.
Allows interception of task cancelation.
Allows the interception of zone forking.
When the zone is being forked, the request is forwarded to this method for interception.
Allows interception of the error handling.
Notifies of changes to the task queue empty status.
Allows interception of the wrapping of the callback.
Allows interception of the callback invocation.
Allows interception of task scheduling.
A set of properties to be associated with Zone. Use [Zone.get] to retrive them.
Task type: microTask, macroTask, eventTask.
Generated using TypeDoc
An abstract class for handling cookies.